From: Heikki Krogerus Date: Wed, 19 Nov 2014 15:28:17 +0000 (+0200) Subject: phy: safer to_phy() macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d451057464a7ea2fe400e56c8a7e004c875f2a84;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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))