Skip to content

Commit 00ca8a1

Browse files
krzkvinodkoul
authored andcommitted
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>
1 parent 505dfc6 commit 00ca8a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+55
-55
lines changed

drivers/phy/allwinner/phy-sun4i-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ static int sun4i_usb_phy0_vbus_notify(struct notifier_block *nb,
683683
}
684684

685685
static struct phy *sun4i_usb_phy_xlate(struct device *dev,
686-
struct of_phandle_args *args)
686+
const struct of_phandle_args *args)
687687
{
688688
struct sun4i_usb_phy_data *data = dev_get_drvdata(dev);
689689

drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int phy_g12a_usb3_pcie_exit(struct phy *phy)
350350
}
351351

352352
static struct phy *phy_g12a_usb3_pcie_xlate(struct device *dev,
353-
struct of_phandle_args *args)
353+
const struct of_phandle_args *args)
354354
{
355355
struct phy_g12a_usb3_pcie_priv *priv = dev_get_drvdata(dev);
356356
unsigned int mode;

drivers/phy/broadcom/phy-bcm-sr-pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static const struct phy_ops sr_paxc_phy_ops = {
195195
};
196196

197197
static struct phy *sr_pcie_phy_xlate(struct device *dev,
198-
struct of_phandle_args *args)
198+
const struct of_phandle_args *args)
199199
{
200200
struct sr_pcie_phy_core *core;
201201
int phy_idx;

drivers/phy/broadcom/phy-bcm-sr-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static const struct phy_ops sr_phy_ops = {
209209
};
210210

211211
static struct phy *bcm_usb_phy_xlate(struct device *dev,
212-
struct of_phandle_args *args)
212+
const struct of_phandle_args *args)
213213
{
214214
struct bcm_usb_phy_cfg *phy_cfg;
215215
int phy_idx;

drivers/phy/broadcom/phy-bcm63xx-usbh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static const struct phy_ops bcm63xx_usbh_phy_ops = {
366366
};
367367

368368
static struct phy *bcm63xx_usbh_phy_xlate(struct device *dev,
369-
struct of_phandle_args *args)
369+
const struct of_phandle_args *args)
370370
{
371371
struct bcm63xx_usbh_phy *usbh = dev_get_drvdata(dev);
372372

drivers/phy/broadcom/phy-brcm-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static const struct phy_ops brcm_usb_phy_ops = {
175175
};
176176

177177
static struct phy *brcm_usb_phy_xlate(struct device *dev,
178-
struct of_phandle_args *args)
178+
const struct of_phandle_args *args)
179179
{
180180
struct brcm_usb_phy_data *data = dev_get_drvdata(dev);
181181

drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static int mixel_lvds_phy_reset(struct device *dev)
294294
}
295295

296296
static struct phy *mixel_lvds_phy_xlate(struct device *dev,
297-
struct of_phandle_args *args)
297+
const struct of_phandle_args *args)
298298
{
299299
struct mixel_lvds_phy_priv *priv = dev_get_drvdata(dev);
300300
unsigned int phy_id;

drivers/phy/freescale/phy-fsl-lynx-28g.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ static void lynx_28g_lane_read_configuration(struct lynx_28g_lane *lane)
556556
}
557557

558558
static struct phy *lynx_28g_xlate(struct device *dev,
559-
struct of_phandle_args *args)
559+
const struct of_phandle_args *args)
560560
{
561561
struct lynx_28g_priv *priv = dev_get_drvdata(dev);
562562
int idx = args->args[0];

drivers/phy/hisilicon/phy-histb-combphy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static const struct phy_ops histb_combphy_ops = {
163163
};
164164

165165
static struct phy *histb_combphy_xlate(struct device *dev,
166-
struct of_phandle_args *args)
166+
const struct of_phandle_args *args)
167167
{
168168
struct histb_combphy_priv *priv = dev_get_drvdata(dev);
169169
struct histb_combphy_mode *mode = &priv->mode;

drivers/phy/intel/phy-intel-lgm-combo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static const struct phy_ops intel_cbphy_ops = {
508508
};
509509

510510
static struct phy *intel_cbphy_xlate(struct device *dev,
511-
struct of_phandle_args *args)
511+
const struct of_phandle_args *args)
512512
{
513513
struct intel_combo_phy *cbphy = dev_get_drvdata(dev);
514514
u32 iphy_id;

0 commit comments

Comments
 (0)