Skip to contentSkip to conversation

serial: fix mctrl helper functions

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 12, 2015 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: fix mctrl helper functions

A recent patch to create common helper functions for modem control lines created empty helper functions in a header file, but accidentally did not mark them as 'static inline', which causes build errors:

drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_enable_ms':
mxs-auart.c:(.text+0x171c): multiple definition of mctrl_gpio_enable_ms' drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x768): first defined here drivers/tty/serial/mxs-auart.o: In function mctrl_gpio_disable_ms':
mxs-auart.c:(.text+0x1720): multiple definition of `mctrl_gpio_disable_ms' drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x76c): first defined here

This adds the missing annotation, so the functions do not get placed in each object file.

Fixes ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling")
drivers/tty/serial/serial_mctrl_gpio.h +2 -2
index 3c4ac9ae41f9..9716db283290 100644
@@ -133,11 +133,11 @@ void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
 {
 }
 
-void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
 {
 }
 
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 {
 }
 
Acked-by on v1 1/1
#1 lore raw

Hello Arnd,

Quoted 11 lines · Arnd Bergmann

A recent patch to create common helper functions for modem control lines created empty helper functions in a header file, but accidentally did not mark them as 'static inline', which causes build errors:

drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_enable_ms':
mxs-auart.c:(.text+0x171c): multiple definition of mctrl_gpio_enable_ms' drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x768): first defined here drivers/tty/serial/mxs-auart.o: In function mctrl_gpio_disable_ms':
mxs-auart.c:(.text+0x1720): multiple definition of `mctrl_gpio_disable_ms' drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x76c): first defined here

Quoted 5 lines

This adds the missing annotation, so the functions do not get placed in each object file.

Fixes ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling")

Sounds and looks right. Thanks.

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |