diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2015-01-29 12:22:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-30 21:08:25 -0500 |
commit | a994a09097660d7ae6cdf868720f7a991b19b987 (patch) | |
tree | b28052d4281cc75632384315f2895c96ee41881d /net/irda/irlap.c | |
parent | 9d6dbe1bbaf8bf03804c164fb67a98646bf2f622 (diff) |
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: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlap.c')
-rw-r--r-- | net/irda/irlap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 7f2cafddfb6e..1cde711bcab5 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c | |||
@@ -533,7 +533,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) | |||
533 | info.discovery = discovery; | 533 | info.discovery = discovery; |
534 | 534 | ||
535 | /* sysctl_slot_timeout bounds are checked in irsysctl.c - Jean II */ | 535 | /* sysctl_slot_timeout bounds are checked in irsysctl.c - Jean II */ |
536 | self->slot_timeout = sysctl_slot_timeout * HZ / 1000; | 536 | self->slot_timeout = msecs_to_jiffies(sysctl_slot_timeout); |
537 | 537 | ||
538 | irlap_do_event(self, DISCOVERY_REQUEST, NULL, &info); | 538 | irlap_do_event(self, DISCOVERY_REQUEST, NULL, &info); |
539 | } | 539 | } |
@@ -1015,13 +1015,15 @@ void irlap_apply_connection_parameters(struct irlap_cb *self, int now) | |||
1015 | * Or, this is how much we can keep the pf bit in primary mode. | 1015 | * Or, this is how much we can keep the pf bit in primary mode. |
1016 | * Therefore, it must be lower or equal than our *OWN* max turn around. | 1016 | * Therefore, it must be lower or equal than our *OWN* max turn around. |
1017 | * Jean II */ | 1017 | * Jean II */ |
1018 | self->poll_timeout = self->qos_tx.max_turn_time.value * HZ / 1000; | 1018 | self->poll_timeout = msecs_to_jiffies( |
1019 | self->qos_tx.max_turn_time.value); | ||
1019 | /* The Final timeout applies only to the primary station. | 1020 | /* The Final timeout applies only to the primary station. |
1020 | * It defines the maximum time the primary wait (mostly in RECV mode) | 1021 | * It defines the maximum time the primary wait (mostly in RECV mode) |
1021 | * for an answer from the secondary station before polling it again. | 1022 | * for an answer from the secondary station before polling it again. |
1022 | * Therefore, it must be greater or equal than our *PARTNER* | 1023 | * Therefore, it must be greater or equal than our *PARTNER* |
1023 | * max turn around time - Jean II */ | 1024 | * max turn around time - Jean II */ |
1024 | self->final_timeout = self->qos_rx.max_turn_time.value * HZ / 1000; | 1025 | self->final_timeout = msecs_to_jiffies( |
1026 | self->qos_rx.max_turn_time.value); | ||
1025 | /* The Watchdog Bit timeout applies only to the secondary station. | 1027 | /* The Watchdog Bit timeout applies only to the secondary station. |
1026 | * It defines the maximum time the secondary wait (mostly in RECV mode) | 1028 | * It defines the maximum time the secondary wait (mostly in RECV mode) |
1027 | * for poll from the primary station before getting annoyed. | 1029 | * for poll from the primary station before getting annoyed. |