Commit 4d245501 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Kalle Valo

cw1200: use msecs_to_jiffies for conversion

This is only an API consolidation to make things more readable.
Instances of  HZ / CONST  are replaced by appropriate msecs_to_jiffies().
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 8bfae4f9
...@@ -39,9 +39,9 @@ static int cw1200_scan_start(struct cw1200_common *priv, struct wsm_scan *scan) ...@@ -39,9 +39,9 @@ static int cw1200_scan_start(struct cw1200_common *priv, struct wsm_scan *scan)
cancel_delayed_work_sync(&priv->clear_recent_scan_work); cancel_delayed_work_sync(&priv->clear_recent_scan_work);
atomic_set(&priv->scan.in_progress, 1); atomic_set(&priv->scan.in_progress, 1);
atomic_set(&priv->recent_scan, 1); atomic_set(&priv->recent_scan, 1);
cw1200_pm_stay_awake(&priv->pm_state, tmo * HZ / 1000); cw1200_pm_stay_awake(&priv->pm_state, msecs_to_jiffies(tmo));
queue_delayed_work(priv->workqueue, &priv->scan.timeout, queue_delayed_work(priv->workqueue, &priv->scan.timeout,
tmo * HZ / 1000); msecs_to_jiffies(tmo));
ret = wsm_scan(priv, scan); ret = wsm_scan(priv, scan);
if (ret) { if (ret) {
atomic_set(&priv->scan.in_progress, 0); atomic_set(&priv->scan.in_progress, 0);
...@@ -386,8 +386,8 @@ void cw1200_probe_work(struct work_struct *work) ...@@ -386,8 +386,8 @@ void cw1200_probe_work(struct work_struct *work)
if (down_trylock(&priv->scan.lock)) { if (down_trylock(&priv->scan.lock)) {
/* Scan is already in progress. Requeue self. */ /* Scan is already in progress. Requeue self. */
schedule(); schedule();
queue_delayed_work(priv->workqueue, queue_delayed_work(priv->workqueue, &priv->scan.probe_work,
&priv->scan.probe_work, HZ / 10); msecs_to_jiffies(100));
mutex_unlock(&priv->conf_mutex); mutex_unlock(&priv->conf_mutex);
return; return;
} }
......
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