diff mbox

[ltsi-3.10,550/595] sh-pfc: Pass the pin number down to the port function macro

Message ID 1384917713-15962-551-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman Nov. 20, 2013, 3:21 a.m. UTC
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The PORT_1 macro invokes a macro passed as a parameter. Pass the pin
number down to that macro at the bottom of the call stack. This will be
used to compute the pin ranges automatically.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
(cherry picked from commit 3ce0d7eba042b186cdf9e50f53320240ae36cf6b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/pinctrl/sh-pfc/sh_pfc.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index 005b482..596ceb7 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -229,7 +229,7 @@  struct sh_pfc_soc_info {
  * PORT style (linear pin space)
  */
 
-#define PORT_1(pn, fn, pfx, sfx) fn(pfx, sfx)
+#define PORT_1(pn, fn, pfx, sfx) fn(pn, pfx, sfx)
 
 #define PORT_10(pn, fn, pfx, sfx)					  \
 	PORT_1(pn,   fn, pfx##0, sfx), PORT_1(pn+1, fn, pfx##1, sfx),	  \
@@ -246,7 +246,7 @@  struct sh_pfc_soc_info {
 	PORT_10(pn+90, fn, pfx##9, sfx)
 
 /* PORT_ALL(suffix) - Expand to a list of PORT_#_suffix */
-#define _PORT_ALL(pfx, sfx)		pfx##_##sfx
+#define _PORT_ALL(pn, pfx, sfx)		pfx##_##sfx
 #define PORT_ALL(str)			CPU_ALL_PORT(_PORT_ALL, PORT, str)
 
 /* PINMUX_GPIO - Expand to a sh_pfc_pin entry */
@@ -267,7 +267,7 @@  struct sh_pfc_soc_info {
 /* PINMUX_DATA_ALL - Expand to a list of PORT_name_DATA, PORT_name_FN0,
  *		     PORT_name_OUT, PORT_name_IN marks
  */
-#define _PORT_DATA(pfx, sfx)						\
+#define _PORT_DATA(pn, pfx, sfx)					\
 	PINMUX_DATA(PORT##pfx##_DATA, PORT##pfx##_FN0,			\
 		    PORT##pfx##_OUT, PORT##pfx##_IN)
 #define PINMUX_DATA_ALL()		CPU_ALL_PORT(_PORT_DATA, , unused)