Skip to content

Commit

Permalink
phy: safer to_phy() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heikki Krogerus authored and Kishon Vijay Abraham I committed Nov 21, 2014
1 parent 2f3fa3a commit d451057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/phy/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d451057

Please sign in to comment.