Skip to contentSkip to conversation

blackfin: portmux: define proper no-ops for peripheral_* for CONFIG_PINCTRL=y

PATCH Superseded Marc Kleine-Budde 1 participant 1 message Mar 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blackfin: portmux: define proper no-ops for peripheral_* for CONFIG_PINCTRL=y

When compiling blackfin code with CONFIG_PINCTRL=y, several functions peripheral_* are no-oped by #define'ing them to nothing. This may lead to unused variable warning in the code that's using the peripheral_* function.

This patch defines proper static inline no-op functions to fix these warnings.

---
 arch/blackfin/include/asm/portmux.h | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
arch/blackfin/include/asm/portmux.h +14 -4
index c8f0939419be..110a66bbc268 100644
@@ -23,10 +23,20 @@ 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[])
+{
+}
 #else
 int peripheral_request(unsigned short per, const char *label);
 void peripheral_free(unsigned short per);
Signature · 1 line
2.1.4