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 <hofrat@osadl.org> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
678afb9aa8
commit
3372ec2862
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user