From: Nicholas Mc Guire Date: Mon, 9 Feb 2015 15:54:10 +0000 (-0500) Subject: vt: use msecs_to_jiffies for time conversion X-Git-Tag: v4.1-rc1~61^2~77^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3372ec28622083ac87daf18918a222fbee06f6f9;p=karo-tx-linux.git vt: use msecs_to_jiffies for time conversion Converting milliseconds to jiffies by "val * HZ / 1000" is technically OK but msecs_to_jiffies(val) is the cleaner solution and handles all corner cases correctly. This is a minor API consolidation only and should make things more readable. Signed-off-by: Nicholas Mc Guire Reviewed-by: David Herrmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 57ed647658be..edf17b4e385f 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1573,7 +1573,7 @@ static void setterm_command(struct vc_data *vc) case 11: /* set bell duration in msec */ if (vc->vc_npar >= 1) vc->vc_bell_duration = (vc->vc_par[1] < 2000) ? - vc->vc_par[1] * HZ / 1000 : 0; + msecs_to_jiffies(vc->vc_par[1]) : 0; else vc->vc_bell_duration = DEFAULT_BELL_DURATION; break;