Skip to contentSkip to conversation

blackfin: convert pinmux request API into empty static inline functions for bf609 and bf548

PATCH In review Sonic Zhang 2 participants 2 messages Feb 6, 2015 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blackfin: convert pinmux request API into empty static inline functions for bf609 and bf548

From: Sonic Zhang <[email protected]>

---
 arch/blackfin/include/asm/portmux.h |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
arch/blackfin/include/asm/portmux.h +11 -4
index ccb96ca..2f6893e 100644
@@ -23,10 +23,17 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state);
 #define gpio_pint_regs bfin_pint_regs
 #define adi_internal_set_wake bfin_internal_set_wake
 
-#define peripheral_request(per, label) (0)
-#define peripheral_free(per)
-#define peripheral_request_list(per, label) (0)
-#define peripheral_free_list(per)
+static inline int peripheral_request(unsigned short per, const char *label)
+{
+	return 0;
+}
+static inline void peripheral_free(unsigned short per) {}
+static inline int peripheral_request_list(const unsigned short per[],
+					  const char *label)
+{
+	return 0;
+}
+static inline void peripheral_free_list(const unsigned short per[]) {}
 int pinmux_request(unsigned short per, const char *label);
 void pinmux_free(unsigned short per);
 int pinmux_request_list(const unsigned short per[], const char *label);
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Sonic Zhang

From: Sonic Zhang <[email protected]>

I do not think arch changes shoudl go through my tree though...

Quoted 33 lines
---
 arch/blackfin/include/asm/portmux.h |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
arch/blackfin/include/asm/portmux.h +11 -4
index ccb96ca..2f6893e 100644
@@ -23,10 +23,17 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state);
 #define gpio_pint_regs bfin_pint_regs
 #define adi_internal_set_wake bfin_internal_set_wake
 
-#define peripheral_request(per, label) (0)
-#define peripheral_free(per)
-#define peripheral_request_list(per, label) (0)
-#define peripheral_free_list(per)
+static inline int peripheral_request(unsigned short per, const char *label)
+{
+	return 0;
+}
+static inline void peripheral_free(unsigned short per) {}
+static inline int peripheral_request_list(const unsigned short per[],
+					  const char *label)
+{
+	return 0;
+}
+static inline void peripheral_free_list(const unsigned short per[]) {}
 int pinmux_request(unsigned short per, const char *label);
 void pinmux_free(unsigned short per);
 int pinmux_request_list(const unsigned short per[], const char *label);
Signature · 1 line
1.7.9.5
Signature · 1 line
Dmitry