Message ID | 20161123100106.15969-5-s.hauer@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Sascha, [auto build test ERROR on tty/tty-testing] [also build test ERROR on v4.9-rc6 next-20161123] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/serial-core-Add-LED-trigger-support/20161124-010846 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing config: s390-allmodconfig (attached as .config) compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=s390 All errors (new ones prefixed by >>): >> ERROR: "uart_remove_led_triggers" [drivers/tty/serial/imx.ko] undefined! >> ERROR: "uart_led_trigger_rx" [drivers/tty/serial/imx.ko] undefined! >> ERROR: "uart_led_trigger_tx" [drivers/tty/serial/imx.ko] undefined! >> ERROR: "uart_add_led_triggers" [drivers/tty/serial/imx.ko] undefined! ERROR: "uart_led_trigger_rx" [drivers/tty/serial/8250/8250_base.ko] undefined! ERROR: "uart_led_trigger_tx" [drivers/tty/serial/8250/8250_base.ko] undefined! ERROR: "uart_remove_led_triggers" [drivers/tty/serial/8250/8250.ko] undefined! ERROR: "uart_add_led_triggers" [drivers/tty/serial/8250/8250.ko] undefined! --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a70356d..5eaf576 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -444,6 +444,8 @@ static inline void imx_transmit_buffer(struct imx_port *sport) return; } + uart_led_trigger_tx(&sport->port); + if (sport->dma_is_enabled) { /* * We've just sent a X-char Ensure the TX DMA is enabled @@ -569,6 +571,7 @@ static void imx_dma_tx(struct imx_port *sport) /* fire it */ sport->dma_is_txing = 1; dmaengine_submit(desc); + uart_led_trigger_tx(&sport->port); dma_async_issue_pending(chan); return; } @@ -655,6 +658,8 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) struct tty_port *port = &sport->port.state->port; unsigned long flags, temp; + uart_led_trigger_rx(&sport->port); + spin_lock_irqsave(&sport->port.lock, flags); while (readl(sport->port.membase + USR2) & USR2_RDR) { @@ -729,6 +734,8 @@ static void imx_dma_rxint(struct imx_port *sport) unsigned long temp; unsigned long flags; + uart_led_trigger_rx(&sport->port); + spin_lock_irqsave(&sport->port.lock, flags); temp = readl(sport->port.membase + USR2); @@ -2184,14 +2191,27 @@ static int serial_imx_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sport); - return uart_add_one_port(&imx_reg, &sport->port); + ret = uart_add_one_port(&imx_reg, &sport->port); + if (ret) + return ret; + + uart_add_led_triggers(&imx_reg, &sport->port); + + return 0; } static int serial_imx_remove(struct platform_device *pdev) { struct imx_port *sport = platform_get_drvdata(pdev); + int ret; - return uart_remove_one_port(&imx_reg, &sport->port); + ret = uart_remove_one_port(&imx_reg, &sport->port); + if (ret) + return ret; + + uart_remove_led_triggers(&sport->port); + + return 0; } static void serial_imx_restore_context(struct imx_port *sport)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/tty/serial/imx.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)