phy: safer to_phy() macro
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 19 Nov 2014 15:28:17 +0000 (17:28 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 21 Nov 2014 14:18:50 +0000 (19:48 +0530)
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>
include/linux/phy/phy.h

index 8cb6f815475b0f5a237e6305986bc5e60ab08b8c..9fda68324298bc085214fa64feffe8d0fda7e8c8 100644 (file)
@@ -110,7 +110,7 @@ struct phy_init_data {
        .port           = _port,                                \
 }
 
-#define        to_phy(dev)     (container_of((dev), struct phy, dev))
+#define        to_phy(a)       (container_of((a), struct phy, dev))
 
 #define        of_phy_provider_register(dev, xlate)    \
        __of_phy_provider_register((dev), THIS_MODULE, (xlate))