[PATCH] stab at mctrl
From: Linus Walleij
Date: Thu Mar 16 2017 - 11:18:21 EST
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
drivers/tty/serial/Kconfig | 1 +
drivers/tty/serial/serial_mctrl_gpio.h | 55 ------------------------------=
----
2 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 6117ac8da48f..39833d009c18 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1681,5 +1681,6 @@ endmenu
config SERIAL_MCTRL_GPIO
tristate
+ depends on GPIOLIB
endif # TTY
diff --git a/drivers/tty/serial/serial_mctrl_gpio.h
b/drivers/tty/serial/serial_mctrl_gpio.h
index fa000bcff217..ba8f8e531d56 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -40,8 +40,6 @@ enum mctrl_gpio_idx {
*/
struct mctrl_gpios;
-#ifdef CONFIG_GPIOLIB
-
/*
* Set state of the modem control output lines via GPIOs.
*/
@@ -101,57 +99,4 @@ void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios);
*/
void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios);
-#else /* GPIOLIB */
-
-static inline
-void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl)
-{
-}
-
-static inline
-unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl=
)
-{
- return *mctrl;
-}
-
-static inline unsigned int
-mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl)
-{
- return *mctrl;
-}
-
-static inline
-struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
- enum mctrl_gpio_idx gidx)
-{
- return ERR_PTR(-ENOSYS);
-}
-
-static inline
-struct mctrl_gpios *mctrl_gpio_init(struct uart_port *port, unsigned int i=
dx)
-{
- return ERR_PTR(-ENOSYS);
-}
-
-static inline
-struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev,
unsigned int idx)
-{
- return ERR_PTR(-ENOSYS);
-}
-
-static inline
-void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
-{
-}
-
-static inline void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
-{
-}
-
-static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
-{
-}
-
-#endif /* GPIOLIB */
-
#endif
--=20
2.9.3
Yours,
Linus Walleij