Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737267 > unrolled thread

[PATCH 00/10] use setup_timer() helper function.

Started byAllen Pais <allen.lkml@gmail.com>
First post2017-09-22 10:30 +0200
Last post2017-09-22 10:30 +0200
Articles 7 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/10] use setup_timer() helper function. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 01/10] drivers: tty: mux: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 07/10] drivers: tty: sa1100: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 09/10] drivers: tty: sn_console: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    [PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200

#1737267 — [PATCH 00/10] use setup_timer() helper function.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 00/10] use setup_timer() helper function.
Message-ID<usrvs-3Q3-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1737268 — [PATCH 01/10] drivers: tty: mux: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 01/10] drivers: tty: mux: use setup_timer() helper.
Message-ID<usrvs-3Q3-23@gated-at.bofh.it>
In reply to#1737267
    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

[toc] | [prev] | [next] | [standalone]


#1737269 — [PATCH 07/10] drivers: tty: sa1100: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 07/10] drivers: tty: sa1100: use setup_timer() helper.
Message-ID<usrvs-3Q3-25@gated-at.bofh.it>
In reply to#1737267
    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

[toc] | [prev] | [next] | [standalone]


#1737270 — [PATCH 09/10] drivers: tty: sn_console: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 09/10] drivers: tty: sn_console: use setup_timer() helper.
Message-ID<usrvs-3Q3-27@gated-at.bofh.it>
In reply to#1737267
        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

[toc] | [prev] | [next] | [standalone]


#1737271 — [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper.
Message-ID<usrvt-3Q3-31@gated-at.bofh.it>
In reply to#1737267
    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

[toc] | [prev] | [next] | [standalone]


#1737272 — [PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper.
Message-ID<usrvt-3Q3-29@gated-at.bofh.it>
In reply to#1737267
        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

[toc] | [prev] | [next] | [standalone]


#1737273 — [PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 08/10] drivers: tty: n_gsm: use setup_timer() helper.
Message-ID<usrvt-3Q3-33@gated-at.bofh.it>
In reply to#1737267
        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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web