aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy/microchip
diff options
context:
space:
mode:
authorGravatar Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 2024-02-17 10:39:37 +0100
committerGravatar Vinod Koul <vkoul@kernel.org> 2024-02-23 17:43:14 +0530
commit00ca8a15dafa990d391abc37f2b8256ddf909b35 (patch)
tree2e5859e62e8d07674445a020204f7fdd57edbea9 /drivers/phy/microchip
parentphy: ti: tusb1210: Define device IDs (diff)
downloadlinux-00ca8a15dafa990d391abc37f2b8256ddf909b35.tar.gz
linux-00ca8a15dafa990d391abc37f2b8256ddf909b35.tar.bz2
linux-00ca8a15dafa990d391abc37f2b8256ddf909b35.zip
phy: constify of_phandle_args in xlate
The xlate callbacks are supposed to translate of_phandle_args to proper provider without modifying the of_phandle_args. Make the argument pointer to const for code safety and readability. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> #Broadcom Link: https://lore.kernel.org/r/20240217093937.58234-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/microchip')
-rw-r--r--drivers/phy/microchip/lan966x_serdes.c2
-rw-r--r--drivers/phy/microchip/sparx5_serdes.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/microchip/lan966x_serdes.c b/drivers/phy/microchip/lan966x_serdes.c
index c1a41b6cd29b..0188b0f01a8d 100644
--- a/drivers/phy/microchip/lan966x_serdes.c
+++ b/drivers/phy/microchip/lan966x_serdes.c
@@ -516,7 +516,7 @@ static const struct phy_ops serdes_ops = {
};
static struct phy *serdes_simple_xlate(struct device *dev,
- struct of_phandle_args *args)
+ const struct of_phandle_args *args)
{
struct serdes_ctrl *ctrl = dev_get_drvdata(dev);
unsigned int port, idx, i;
diff --git a/drivers/phy/microchip/sparx5_serdes.c b/drivers/phy/microchip/sparx5_serdes.c
index 01bd5ea620c5..7cb85029fab3 100644
--- a/drivers/phy/microchip/sparx5_serdes.c
+++ b/drivers/phy/microchip/sparx5_serdes.c
@@ -2509,7 +2509,7 @@ static struct sparx5_serdes_io_resource sparx5_serdes_iomap[] = {
/* Client lookup function, uses serdes index */
static struct phy *sparx5_serdes_xlate(struct device *dev,
- struct of_phandle_args *args)
+ const struct of_phandle_args *args)
{
struct sparx5_serdes_private *priv = dev_get_drvdata(dev);
int idx;