use setup_timer() helper function.
cover use setup_timer() helper function.
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(-)
Signature · 1 line
2.7.4
PATCH 1/10 drivers: tty: mux: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/mux.c +1 -2
@@ -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
Signature · 1 line
2.7.4
PATCH 2/10 drivers:tty: imx: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/imx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/imx.c +1 -3
@@ -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))
Signature · 1 line
2.7.4
PATCH 3/10 drivers: tty: vcc: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/vcc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/tty/vcc.c +2 -7
@@ -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);
Signature · 1 line
2.7.4
PATCH 4/10 drivers: tty: max3100: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/max3100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/max3100.c +2 -3
@@ -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;
Signature · 1 line
2.7.4
PATCH 5/10 drivers: tty: pnx8xxx: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/pnx8xxx_uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/pnx8xxx_uart.c +2 -3
@@ -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; } }
Signature · 1 line
2.7.4
PATCH 6/10 drivers: tty: 8250: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/8250/8250_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/8250/8250_core.c +1 -2
@@ -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;
Signature · 1 line
2.7.4
PATCH 7/10 drivers: tty: sa1100: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/sa1100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/sa1100.c +2 -3
@@ -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]); }/*
Signature · 1 line
2.7.4
PATCH 8/10 drivers: tty: n_gsm: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/n_gsm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/n_gsm.c +1 -3
@@ -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;
Signature · 1 line
2.7.4
PATCH 9/10 drivers: tty: sn_console: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/sn_console.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/sn_console.c +1 -3
@@ -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 ;
Signature · 1 line
2.7.4
PATCH 10/10 drivers: tty: ifx6x60: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/tty/serial/ifx6x60.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/ifx6x60.c +2 -3
@@ -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;
Signature · 1 line
2.7.4
Re: [PATCH 02/10] drivers:tty: imx: use setup_timer() helper.
In reply to Allen PaisHello,
$Subject ~= s/:/: /
Quoted 13 lines · Allen Pais
Use
setup_timerfunction instead of initializing timer with the function and data fields.Signed-off-by Allen Pais <[email protected]>--- drivers/tty/serial/imx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/imx.c +0
-0
drivers/tty/serial/imx.c static int serial_imx_probe(struct platform_device *pdev) · line 2118
Quoted 7 lines
drivers/tty/serial/imx.c +1
-3@@ -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);
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |