Commit a994a090 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by David S. Miller

irda: use msecs_to_jiffies for conversions

This is only an API consolidation and should make things more readable
it replaces  var * HZ / 1000  constructs by  msecs_to_jiffies(var).
Signed-off-by: default avatarNicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d6dbe1b
...@@ -533,7 +533,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -533,7 +533,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
info.discovery = discovery; info.discovery = discovery;
/* sysctl_slot_timeout bounds are checked in irsysctl.c - Jean II */ /* sysctl_slot_timeout bounds are checked in irsysctl.c - Jean II */
self->slot_timeout = sysctl_slot_timeout * HZ / 1000; self->slot_timeout = msecs_to_jiffies(sysctl_slot_timeout);
irlap_do_event(self, DISCOVERY_REQUEST, NULL, &info); irlap_do_event(self, DISCOVERY_REQUEST, NULL, &info);
} }
...@@ -1015,13 +1015,15 @@ void irlap_apply_connection_parameters(struct irlap_cb *self, int now) ...@@ -1015,13 +1015,15 @@ void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
* Or, this is how much we can keep the pf bit in primary mode. * Or, this is how much we can keep the pf bit in primary mode.
* Therefore, it must be lower or equal than our *OWN* max turn around. * Therefore, it must be lower or equal than our *OWN* max turn around.
* Jean II */ * Jean II */
self->poll_timeout = self->qos_tx.max_turn_time.value * HZ / 1000; self->poll_timeout = msecs_to_jiffies(
self->qos_tx.max_turn_time.value);
/* The Final timeout applies only to the primary station. /* The Final timeout applies only to the primary station.
* It defines the maximum time the primary wait (mostly in RECV mode) * It defines the maximum time the primary wait (mostly in RECV mode)
* for an answer from the secondary station before polling it again. * for an answer from the secondary station before polling it again.
* Therefore, it must be greater or equal than our *PARTNER* * Therefore, it must be greater or equal than our *PARTNER*
* max turn around time - Jean II */ * max turn around time - Jean II */
self->final_timeout = self->qos_rx.max_turn_time.value * HZ / 1000; self->final_timeout = msecs_to_jiffies(
self->qos_rx.max_turn_time.value);
/* The Watchdog Bit timeout applies only to the secondary station. /* The Watchdog Bit timeout applies only to the secondary station.
* It defines the maximum time the secondary wait (mostly in RECV mode) * It defines the maximum time the secondary wait (mostly in RECV mode)
* for poll from the primary station before getting annoyed. * for poll from the primary station before getting annoyed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment