[PATCHv4 1/6] phy: safer to_phy() macro

2014-10-17 Thread Heikki Krogerus
This makes to_phy() macro work with other variable names
besides dev.

Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com
Tested-by: Vivek Gautam gautam.vi...@samsung.com
---
 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 8cb6f81..9fda683 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -110,7 +110,7 @@ struct phy_init_data {
.port   = _port,\
 }
 
-#defineto_phy(dev) (container_of((dev), struct phy, dev))
+#defineto_phy(a)   (container_of((a), struct phy, dev))
 
 #defineof_phy_provider_register(dev, xlate)\
__of_phy_provider_register((dev), THIS_MODULE, (xlate))
-- 
2.1.1

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 1/6] phy: safer to_phy() macro

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 05:39:11PM +0300, Heikki Krogerus wrote:
 This makes to_phy() macro work with other variable names
 besides dev.
 
 Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com
 Tested-by: Vivek Gautam gautam.vi...@samsung.com

Acked-by: Felipe Balbi ba...@ti.com

 ---
  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 8cb6f81..9fda683 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.1.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi


signature.asc
Description: Digital signature