phy: ulpi_phy: Add const qualifier to ops
PATCH 1/1 phy: ulpi_phy: Add const qualifier to ops
The ops is never changed in ulpi_phy_create(), so make it const.
--- drivers/phy/ulpi_phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/ulpi_phy.h +1 -1
@@ -5,7 +5,7 @@* and it's controller, which is always the parent. */ static inline struct phy -*ulpi_phy_create (struct ulpi *ulpi,struct phy_ops *ops) +*ulpi_phy_create (struct ulpi *ulpi,const struct phy_ops *ops) {struct phy *phy;int ret;
Signature · 1 line
2.1.0
2015-06-05 8:27 GMT+08:00 Axel Lin <[email protected]>:
Quoted 1 line
The ops is never changed in
ulpi_phy_create(), so make it const.
Hi Kishon,
Would you pick up this patch?
Without this patch, passing a const struct phy_ops* to ulip_phy_create will have compiler warning.
It should be fine to pass a const struct phy_ops* to ulip_phy_create and since the drivers usually never change phy_ops after initialized, it can be const.
Hi Axel,
Quoted 6 lines · Axel Lin
2015-06-05 8:27 GMT+08:00 Axel Lin <[email protected]>:
Quoted 1 line
The ops is never changed in
ulpi_phy_create(), so make it const.Hi Kishon,
Would you pick up this patch?
yes.. I'll take once I start queuing the patches.
Thanks
Kishon