From d451057464a7ea2fe400e56c8a7e004c875f2a84 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Wed, 19 Nov 2014 17:28:17 +0200 Subject: [PATCH] phy: safer to_phy() macro This makes to_phy() macro work with other variable names besides "dev". Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam Acked-by: Felipe Balbi Signed-off-by: Kishon Vijay Abraham I --- include/linux/phy/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 8cb6f815475b..9fda68324298 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -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)) -- 2.20.1