]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/tty/serial/ifx6x60.c
treewide: setup_timer() -> timer_setup()
[mirror_ubuntu-bionic-kernel.git] / drivers / tty / serial / ifx6x60.c
index 473f4f81d690c6ab21a768c0b0745347fc4d9aa5..ffefd218761e04c633171b3f1b14151e7f05b721 100644 (file)
@@ -263,9 +263,9 @@ static void mrdy_assert(struct ifx_spi_device *ifx_dev)
  *     The SPI has timed out: hang up the tty. Users will then see a hangup
  *     and error events.
  */
-static void ifx_spi_timeout(unsigned long arg)
+static void ifx_spi_timeout(struct timer_list *t)
 {
-       struct ifx_spi_device *ifx_dev = (struct ifx_spi_device *)arg;
+       struct ifx_spi_device *ifx_dev = from_timer(ifx_dev, t, spi_timer);
 
        dev_warn(&ifx_dev->spi_dev->dev, "*** SPI Timeout ***");
        tty_port_tty_hangup(&ifx_dev->tty_port, false);
@@ -1016,8 +1016,7 @@ 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;
-       setup_timer(&ifx_dev->spi_timer, ifx_spi_timeout,
-                   (unsigned long)ifx_dev);
+       timer_setup(&ifx_dev->spi_timer, ifx_spi_timeout, 0);
        ifx_dev->modem = pl_data->modem_type;
        ifx_dev->use_dma = pl_data->use_dma;
        ifx_dev->max_hz = pl_data->max_hz;