mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
atm: nicstar: Replace spin_is_locked() with spin_trylock()
ns_poll() used spin_is_locked() + spin_lock() to get achieve the same thing as a spin_trylock(), so simplify it by using that instead. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy <[email protected]> Cc: Chas Williams <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
9798594cb9
commit
9a694c1de3
1 changed files with 1 additions and 2 deletions
|
|
@ -2689,11 +2689,10 @@ static void ns_poll(struct timer_list *unused)
|
|||
PRINTK("nicstar: Entering ns_poll().\n");
|
||||
for (i = 0; i < num_cards; i++) {
|
||||
card = cards[i];
|
||||
if (spin_is_locked(&card->int_lock)) {
|
||||
if (!spin_trylock_irqsave(&card->int_lock, flags)) {
|
||||
/* Probably it isn't worth spinning */
|
||||
continue;
|
||||
}
|
||||
spin_lock_irqsave(&card->int_lock, flags);
|
||||
|
||||
stat_w = 0;
|
||||
stat_r = readl(card->membase + STAT);
|
||||
|
|
|
|||
Loading…
Reference in a new issue