History

phy: safer to_phy() macro

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

Heikki Krogerus committed 11 years ago

Commit d4510571 parent 2f3fa3a1 file · +1 −1Browse files

Unified · Split

include/linux/phy/phy.h+1−1
@@ -110,7 +110,7 @@ struct phy_init_data { · 109 unmodified lines
110 .port = _port, \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#define of_phy_provider_register(dev, xlate) \115#define of_phy_provider_register(dev, xlate) \
116 __of_phy_provider_register((dev), THIS_MODULE, (xlate))116 __of_phy_provider_register((dev), THIS_MODULE, (xlate))