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>
This commit is contained in:
Heikki Krogerus 2014-11-19 17:28:17 +02:00 committed by Kishon Vijay Abraham I
parent 2f3fa3a0e5
commit d451057464
1 changed files with 1 additions and 1 deletions

View 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))