* [PATCH 00/10] use setup_timer() helper function.
@ 2017-09-22 8:26 Allen Pais
2017-09-22 8:26 ` [PATCH 01/10] drivers: tty: mux: use setup_timer() helper Allen Pais
` (9 more replies)
0 siblings, 10 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
This series uses setup_timer() helper function. The series
addresses the files under drivers/tty/*.
Allen Pais (10):
drivers: tty: mux: use setup_timer() helper.
drivers:tty: imx: use setup_timer() helper.
drivers: tty: vcc: use setup_timer() helper.
drivers: tty: max3100: use setup_timer() helper.
drivers: tty: pnx8xxx: use setup_timer() helper.
drivers: tty: 8250: use setup_timer() helper.
drivers: tty: sa1100: use setup_timer() helper.
drivers: tty: n_gsm: use setup_timer() helper.
drivers: tty: sn_console: use setup_timer() helper.
drivers: tty: ifx6x60: use setup_timer() helper.
drivers/tty/n_gsm.c | 4 +---
drivers/tty/serial/8250/8250_core.c | 3 +--
drivers/tty/serial/ifx6x60.c | 5 ++---
drivers/tty/serial/imx.c | 4 +---
drivers/tty/serial/max3100.c | 5 ++---
drivers/tty/serial/mux.c | 3 +--
drivers/tty/serial/pnx8xxx_uart.c | 5 ++---
drivers/tty/serial/sa1100.c | 5 ++---
drivers/tty/serial/sn_console.c | 4 +---
drivers/tty/vcc.c | 9 ++-------
10 files changed, 15 insertions(+), 32 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 01/10] drivers: tty: mux: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 02/10] drivers:tty: imx: " Allen Pais
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/mux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 2bff69e..a789837 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -576,8 +576,7 @@ static int __init mux_init(void)
if(port_cnt > 0) {
/* Start the Mux timer */
- init_timer(&mux_timer);
- mux_timer.function = mux_poll;
+ setup_timer(&mux_timer, mux_poll, 0UL);
mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
#ifdef CONFIG_SERIAL_MUX_CONSOLE
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 02/10] drivers:tty: imx: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
2017-09-22 8:26 ` [PATCH 01/10] drivers: tty: mux: use setup_timer() helper Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 9:05 ` Uwe Kleine-König
2017-09-22 8:26 ` [PATCH 03/10] drivers: tty: vcc: " Allen Pais
` (7 subsequent siblings)
9 siblings, 1 reply; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/imx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index dfeff39..64f57c6 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2115,9 +2115,7 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->port.rs485.flags =
SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
sport->port.flags = UPF_BOOT_AUTOCONF;
- init_timer(&sport->timer);
- sport->timer.function = imx_timeout;
- sport->timer.data = (unsigned long)sport;
+ setup_timer(&sport->timer, imx_timeout, (unsigned long)sport);
sport->gpios = mctrl_gpio_init(&sport->port, 0);
if (IS_ERR(sport->gpios))
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 03/10] drivers: tty: vcc: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
2017-09-22 8:26 ` [PATCH 01/10] drivers: tty: mux: use setup_timer() helper Allen Pais
2017-09-22 8:26 ` [PATCH 02/10] drivers:tty: imx: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 04/10] drivers: tty: max3100: " Allen Pais
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/vcc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index ef01d24..954b190 100644
--- a/drivers/tty/vcc.c
+++ b/drivers/tty/vcc.c
@@ -645,13 +645,8 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
if (rv)
goto free_domain;
- init_timer(&port->rx_timer);
- port->rx_timer.function = vcc_rx_timer;
- port->rx_timer.data = port->index;
-
- init_timer(&port->tx_timer);
- port->tx_timer.function = vcc_tx_timer;
- port->tx_timer.data = port->index;
+ setup_timer(&port->rx_timer, vcc_rx_timer, port->index);
+ setup_timer(&port->tx_timer, vcc_tx_timer, port->index);
dev_set_drvdata(&vdev->dev, port);
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 04/10] drivers: tty: max3100: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (2 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 03/10] drivers: tty: vcc: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 05/10] drivers: tty: pnx8xxx: " Allen Pais
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/max3100.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index ace8264..b6b3453 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -787,9 +787,8 @@ static int max3100_probe(struct spi_device *spi)
max3100s[i]->poll_time = 1;
max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;
max3100s[i]->minor = i;
- init_timer(&max3100s[i]->timer);
- max3100s[i]->timer.function = max3100_timeout;
- max3100s[i]->timer.data = (unsigned long) max3100s[i];
+ setup_timer(&max3100s[i]->timer, max3100_timeout,
+ (unsigned long)max3100s[i]);
dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i);
max3100s[i]->port.irq = max3100s[i]->irq;
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (3 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 04/10] drivers: tty: max3100: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 06/10] drivers: tty: 8250: " Allen Pais
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/pnx8xxx_uart.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c
index dab2668..a05508a 100644
--- a/drivers/tty/serial/pnx8xxx_uart.c
+++ b/drivers/tty/serial/pnx8xxx_uart.c
@@ -666,9 +666,8 @@ static void __init pnx8xxx_init_ports(void)
first = 0;
for (i = 0; i < NR_PORTS; i++) {
- init_timer(&pnx8xxx_ports[i].timer);
- pnx8xxx_ports[i].timer.function = pnx8xxx_timeout;
- pnx8xxx_ports[i].timer.data = (unsigned long)&pnx8xxx_ports[i];
+ setup_timer(&pnx8xxx_ports[i].timer, pnx8xxx_timeout,
+ (unsigned long)&pnx8xxx_ports[i]);
pnx8xxx_ports[i].port.ops = &pnx8xxx_pops;
}
}
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 06/10] drivers: tty: 8250: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (4 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 05/10] drivers: tty: pnx8xxx: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 07/10] drivers: tty: sa1100: " Allen Pais
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/8250/8250_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index d29b512a..00d4b11 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -525,8 +525,7 @@ static void __init serial8250_isa_init_ports(void)
base_ops = port->ops;
port->ops = &univ8250_port_ops;
- init_timer(&up->timer);
- up->timer.function = serial8250_timeout;
+ setup_timer(&up->timer, serial8250_timeout, 0UL);
up->ops = &univ8250_driver_ops;
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 07/10] drivers: tty: sa1100: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (5 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 06/10] drivers: tty: 8250: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 08/10] drivers: tty: n_gsm: " Allen Pais
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/sa1100.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
index fd3d132..75bd1e0 100644
--- a/drivers/tty/serial/sa1100.c
+++ b/drivers/tty/serial/sa1100.c
@@ -640,9 +640,8 @@ static void __init sa1100_init_ports(void)
sa1100_ports[i].port.fifosize = 8;
sa1100_ports[i].port.line = i;
sa1100_ports[i].port.iotype = UPIO_MEM;
- init_timer(&sa1100_ports[i].timer);
- sa1100_ports[i].timer.function = sa1100_timeout;
- sa1100_ports[i].timer.data = (unsigned long)&sa1100_ports[i];
+ setup_timer(&sa1100_ports[i].timer, sa1100_timeout,
+ (unsigned long)&sa1100_ports[i]);
}
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (6 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 07/10] drivers: tty: sa1100: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 09/10] drivers: tty: sn_console: " Allen Pais
2017-09-22 8:26 ` [PATCH 10/10] drivers: tty: ifx6x60: " Allen Pais
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/n_gsm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 0a3c966..33530d8 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1646,9 +1646,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
}
skb_queue_head_init(&dlci->skb_list);
- init_timer(&dlci->t1);
- dlci->t1.function = gsm_dlci_t1;
- dlci->t1.data = (unsigned long)dlci;
+ setup_timer(&dlci->t1, gsm_dlci_t1, (unsigned long)dlci);
tty_port_init(&dlci->port);
dlci->port.ops = &gsm_port_ops;
dlci->gsm = gsm;
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 09/10] drivers: tty: sn_console: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (7 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 08/10] drivers: tty: n_gsm: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
2017-09-22 8:26 ` [PATCH 10/10] drivers: tty: ifx6x60: " Allen Pais
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/sn_console.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c
index 9e0e658..81d506d2 100644
--- a/drivers/tty/serial/sn_console.c
+++ b/drivers/tty/serial/sn_console.c
@@ -687,9 +687,7 @@ static void __init sn_sal_switch_to_asynch(struct sn_cons_port *port)
* timer to poll for input and push data from the console
* buffer.
*/
- init_timer(&port->sc_timer);
- port->sc_timer.function = sn_sal_timer_poll;
- port->sc_timer.data = (unsigned long)port;
+ setup_timer(&port->sc_timer, sn_sal_timer_poll, (unsigned long)port);
if (IS_RUNNING_ON_SIMULATOR())
port->sc_interrupt_timeout = 6;
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper.
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
` (8 preceding siblings ...)
2017-09-22 8:26 ` [PATCH 09/10] drivers: tty: sn_console: " Allen Pais
@ 2017-09-22 8:26 ` Allen Pais
9 siblings, 0 replies; 12+ messages in thread
From: Allen Pais @ 2017-09-22 8:26 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, gregkh, jslaby, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/serial/ifx6x60.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index f190a84..596b738 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1029,9 +1029,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
spin_lock_init(&ifx_dev->write_lock);
spin_lock_init(&ifx_dev->power_lock);
ifx_dev->power_status = 0;
- init_timer(&ifx_dev->spi_timer);
- ifx_dev->spi_timer.function = ifx_spi_timeout;
- ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
+ setup_timer(&ifx_dev->spi_timer, ifx_spi_timeout,
+ (unsigned long)ifx_dev);
ifx_dev->modem = pl_data->modem_type;
ifx_dev->use_dma = pl_data->use_dma;
ifx_dev->max_hz = pl_data->max_hz;
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 02/10] drivers:tty: imx: use setup_timer() helper.
2017-09-22 8:26 ` [PATCH 02/10] drivers:tty: imx: " Allen Pais
@ 2017-09-22 9:05 ` Uwe Kleine-König
0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2017-09-22 9:05 UTC (permalink / raw)
To: Allen Pais; +Cc: linux-serial, linux-kernel, gregkh, jslaby
Hello,
$Subject ~= s/:/: /
On Fri, Sep 22, 2017 at 01:56:44PM +0530, Allen Pais wrote:
> Use setup_timer function instead of initializing timer with the
> function and data fields.
>
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>
> ---
> drivers/tty/serial/imx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index dfeff39..64f57c6 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -2115,9 +2115,7 @@ static int serial_imx_probe(struct platform_device *pdev)
> sport->port.rs485.flags =
> SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
> sport->port.flags = UPF_BOOT_AUTOCONF;
> - init_timer(&sport->timer);
> - sport->timer.function = imx_timeout;
> - sport->timer.data = (unsigned long)sport;
> + setup_timer(&sport->timer, imx_timeout, (unsigned long)sport);
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-09-22 9:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
2017-09-22 8:26 ` [PATCH 01/10] drivers: tty: mux: use setup_timer() helper Allen Pais
2017-09-22 8:26 ` [PATCH 02/10] drivers:tty: imx: " Allen Pais
2017-09-22 9:05 ` Uwe Kleine-König
2017-09-22 8:26 ` [PATCH 03/10] drivers: tty: vcc: " Allen Pais
2017-09-22 8:26 ` [PATCH 04/10] drivers: tty: max3100: " Allen Pais
2017-09-22 8:26 ` [PATCH 05/10] drivers: tty: pnx8xxx: " Allen Pais
2017-09-22 8:26 ` [PATCH 06/10] drivers: tty: 8250: " Allen Pais
2017-09-22 8:26 ` [PATCH 07/10] drivers: tty: sa1100: " Allen Pais
2017-09-22 8:26 ` [PATCH 08/10] drivers: tty: n_gsm: " Allen Pais
2017-09-22 8:26 ` [PATCH 09/10] drivers: tty: sn_console: " Allen Pais
2017-09-22 8:26 ` [PATCH 10/10] drivers: tty: ifx6x60: " Allen Pais
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).