Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4510574 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Kishon Vijay Abraham I
Browse files

phy: safer to_phy() macro



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

Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
Acked-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 2f3fa3a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))