Commit db7a673a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: slicoss: remove jiffies macros

Use the ones built into the kernel, don't reinvent the wheel.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b574488e
...@@ -42,9 +42,6 @@ ...@@ -42,9 +42,6 @@
#ifndef _SLIC_OS_SPECIFIC_H_ #ifndef _SLIC_OS_SPECIFIC_H_
#define _SLIC_OS_SPECIFIC_H_ #define _SLIC_OS_SPECIFIC_H_
#define SLIC_SECS_TO_JIFFS(x) ((x) * HZ)
#define SLIC_MS_TO_JIFFIES(x) (SLIC_SECS_TO_JIFFS((x)) / 1000)
#ifdef DEBUG_REGISTER_TRACE #ifdef DEBUG_REGISTER_TRACE
#define WRITE_REG(reg, value, flush) \ #define WRITE_REG(reg, value, flush) \
{ \ { \
......
...@@ -1713,8 +1713,7 @@ static void slic_timer_ping(ulong dev) ...@@ -1713,8 +1713,7 @@ static void slic_timer_ping(ulong dev)
__func__, adapter->netdev->name, adapter); __func__, adapter->netdev->name, adapter);
} }
#endif #endif
adapter->pingtimer.expires = adapter->pingtimer.expires = jiffies + (PING_TIMER_INTERVAL * HZ);
jiffies + SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL);
add_timer(&adapter->pingtimer); add_timer(&adapter->pingtimer);
} }
...@@ -1834,7 +1833,7 @@ static int slic_if_init(struct adapter *adapter) ...@@ -1834,7 +1833,7 @@ static int slic_if_init(struct adapter *adapter)
if (!card->loadtimerset) { if (!card->loadtimerset) {
init_timer(&card->loadtimer); init_timer(&card->loadtimer);
card->loadtimer.expires = card->loadtimer.expires =
jiffies + SLIC_SECS_TO_JIFFS(SLIC_LOADTIMER_PERIOD); jiffies + (SLIC_LOADTIMER_PERIOD * HZ);
card->loadtimer.data = (ulong) card; card->loadtimer.data = (ulong) card;
card->loadtimer.function = &slic_timer_load_check; card->loadtimer.function = &slic_timer_load_check;
add_timer(&card->loadtimer); add_timer(&card->loadtimer);
...@@ -1847,7 +1846,7 @@ static int slic_if_init(struct adapter *adapter) ...@@ -1847,7 +1846,7 @@ static int slic_if_init(struct adapter *adapter)
__func__); __func__);
init_timer(&adapter->statstimer); init_timer(&adapter->statstimer);
adapter->statstimer.expires = adapter->statstimer.expires =
jiffies + SLIC_SECS_TO_JIFFS(STATS_TIMER_INTERVAL); jiffies + (STATS_TIMER_INTERVAL * HZ);
adapter->statstimer.data = (ulong) adapter->netdev; adapter->statstimer.data = (ulong) adapter->netdev;
adapter->statstimer.function = &slic_timer_get_stats; adapter->statstimer.function = &slic_timer_get_stats;
add_timer(&adapter->statstimer); add_timer(&adapter->statstimer);
...@@ -1861,7 +1860,7 @@ static int slic_if_init(struct adapter *adapter) ...@@ -1861,7 +1860,7 @@ static int slic_if_init(struct adapter *adapter)
__func__); __func__);
init_timer(&adapter->pingtimer); init_timer(&adapter->pingtimer);
adapter->pingtimer.expires = adapter->pingtimer.expires =
jiffies + SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL); jiffies + (PING_TIMER_INTERVAL * HZ);
adapter->pingtimer.data = (ulong) dev; adapter->pingtimer.data = (ulong) dev;
adapter->pingtimer.function = &slic_timer_ping; adapter->pingtimer.function = &slic_timer_ping;
add_timer(&adapter->pingtimer); add_timer(&adapter->pingtimer);
...@@ -3134,8 +3133,7 @@ static void slic_timer_get_stats(ulong dev) ...@@ -3134,8 +3133,7 @@ static void slic_timer_get_stats(ulong dev)
/* DBG_MSG ("slicoss: %s adapter[%p] linkstate[%x] NOT UP!\n", /* DBG_MSG ("slicoss: %s adapter[%p] linkstate[%x] NOT UP!\n",
__func__, adapter, adapter->linkstate); */ __func__, adapter, adapter->linkstate); */
} }
adapter->statstimer.expires = jiffies + adapter->statstimer.expires = jiffies + (STATS_TIMER_INTERVAL * HZ);
SLIC_SECS_TO_JIFFS(STATS_TIMER_INTERVAL);
add_timer(&adapter->statstimer); add_timer(&adapter->statstimer);
} }
#endif #endif
...@@ -3191,8 +3189,7 @@ static void slic_timer_load_check(ulong cardaddr) ...@@ -3191,8 +3189,7 @@ static void slic_timer_load_check(ulong cardaddr)
} }
} }
card->events = 0; card->events = 0;
card->loadtimer.expires = card->loadtimer.expires = jiffies + (SLIC_LOADTIMER_PERIOD * HZ);
jiffies + SLIC_SECS_TO_JIFFS(SLIC_LOADTIMER_PERIOD);
add_timer(&card->loadtimer); add_timer(&card->loadtimer);
} }
...@@ -4920,7 +4917,7 @@ static int slic_dump_thread(void *context) ...@@ -4920,7 +4917,7 @@ static int slic_dump_thread(void *context)
struct adapter *adapter; struct adapter *adapter;
struct adapter *dump_adapter = NULL; struct adapter *dump_adapter = NULL;
u32 dump_complete = 0; u32 dump_complete = 0;
u32 delay = SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL); u32 delay = (PING_TIMER_INTERVAL * HZ);
struct slic_regs *pregs; struct slic_regs *pregs;
u32 i; u32 i;
struct slic_upr *upr, *uprnext; struct slic_upr *upr, *uprnext;
...@@ -5763,9 +5760,9 @@ static u32 slic_dump_send_cmd(struct sliccard *card, ...@@ -5763,9 +5760,9 @@ static u32 slic_dump_send_cmd(struct sliccard *card,
u32 cmd_physh, u32 cmd_physh,
u32 buf_physl, u32 buf_physh) u32 buf_physl, u32 buf_physh)
{ {
ulong timeout = SLIC_MS_TO_JIFFIES(500); /* 500 msec */ ulong timeout = msecs_to_jiffies(500); /* 500 msec */
u32 attempts = 5; u32 attempts = 5;
u32 delay = SLIC_MS_TO_JIFFIES(10); /* 10 msec */ u32 delay = msecs_to_jiffies(10); /* 10 msec */
struct adapter *adapter = card->master; struct adapter *adapter = card->master;
ASSERT(adapter); ASSERT(adapter);
......
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