diff options
author | David Kilroy <kilroyd@googlemail.com> | 2010-05-01 09:05:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-03 14:53:07 -0400 |
commit | bcad6e80f3fb0d6724c3814cf32258bbcf1d67db (patch) | |
tree | 13fc2edae79405b7ae393099486153eefa3091d1 /drivers/net/wireless/orinoco/hermes.h | |
parent | 593ef09c9e70c92c0d76c67a1c03a5d44d3aec82 (diff) |
orinoco: encapsulate driver locking
Local bus and USB drivers will need to do locking differently.
The original orinoco_usb patches had a boolean variable controlling
whether spin_lock_bh was used, or irq based locking. This version
provides wrappers for the lock functions and the drivers specify the
functions pointers needed.
This will introduce a performance penalty, but I'm not expecting it to
be noticable.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/hermes.h')
-rw-r--r-- | drivers/net/wireless/orinoco/hermes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/hermes.h b/drivers/net/wireless/orinoco/hermes.h index 18b268c54dfe..9e21ecdb4e70 100644 --- a/drivers/net/wireless/orinoco/hermes.h +++ b/drivers/net/wireless/orinoco/hermes.h | |||
@@ -393,6 +393,10 @@ struct hermes_ops { | |||
393 | u16 id, u16 offset); | 393 | u16 id, u16 offset); |
394 | int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, | 394 | int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, |
395 | int len, u16 id, u16 offset); | 395 | int len, u16 id, u16 offset); |
396 | void (*lock_irqsave)(spinlock_t *lock, unsigned long *flags); | ||
397 | void (*unlock_irqrestore)(spinlock_t *lock, unsigned long *flags); | ||
398 | void (*lock_irq)(spinlock_t *lock); | ||
399 | void (*unlock_irq)(spinlock_t *lock); | ||
396 | }; | 400 | }; |
397 | 401 | ||
398 | /* Basic control structure */ | 402 | /* Basic control structure */ |