Skip to content

Commit c89b737

Browse files
Nicholas Mc Guiregregkh
authored andcommitted
tty: max3100: use msecs_to_jiffies for time conversion
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>
1 parent 4f86a95 commit c89b737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/max3100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ static int max3100_probe(struct spi_device *spi)
782782
pdata = dev_get_platdata(&spi->dev);
783783
max3100s[i]->crystal = pdata->crystal;
784784
max3100s[i]->loopback = pdata->loopback;
785-
max3100s[i]->poll_time = pdata->poll_time * HZ / 1000;
785+
max3100s[i]->poll_time = msecs_to_jiffies(pdata->poll_time);
786786
if (pdata->poll_time > 0 && max3100s[i]->poll_time == 0)
787787
max3100s[i]->poll_time = 1;
788788
max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;

0 commit comments

Comments
 (0)