tty: max3100: use msecs_to_jiffies for time conversion
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 9 Feb 2015 14:41:49 +0000 (09:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 02:13:08 +0000 (03:13 +0100)
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c

index 79f9a9eff5455e561d3cdb98e57d0aee16281d38..077377259a2ce459f515c41da7f4e016d2804459 100644 (file)
@@ -782,7 +782,7 @@ static int max3100_probe(struct spi_device *spi)
        pdata = dev_get_platdata(&spi->dev);
        max3100s[i]->crystal = pdata->crystal;
        max3100s[i]->loopback = pdata->loopback;
-       max3100s[i]->poll_time = pdata->poll_time * HZ / 1000;
+       max3100s[i]->poll_time = msecs_to_jiffies(pdata->poll_time);
        if (pdata->poll_time > 0 && max3100s[i]->poll_time == 0)
                max3100s[i]->poll_time = 1;
        max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;