Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: safer to_phy() macro

This makes to_phy() macro work with other variable names
besides "dev".

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Heikki Krogerus and committed by
Kishon Vijay Abraham I
d4510574 2f3fa3a0

+1 -1
+1 -1
include/linux/phy/phy.h
··· 110 110 .port = _port, \ 111 111 } 112 112 113 - #define to_phy(dev) (container_of((dev), struct phy, dev)) 113 + #define to_phy(a) (container_of((a), struct phy, dev)) 114 114 115 115 #define of_phy_provider_register(dev, xlate) \ 116 116 __of_phy_provider_register((dev), THIS_MODULE, (xlate))