diff options
author | Pavel Roskin <proski@gnu.org> | 2006-04-07 04:10:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 16:15:50 -0400 |
commit | 6b61626290900f12b7f3978f57f329da6811fb59 (patch) | |
tree | 2e1d9518d786bbca0e87ffec3f42a6f5794fe384 /drivers/net/wireless/hermes.h | |
parent | b34b867e944628418d587367276c9a82e03aba8c (diff) |
[PATCH] orinoco replace hermes_write_words() with hermes_write_bytes()
The new function can write an odd number of bytes, thus making padding
unnecessary.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hermes.h')
-rw-r--r-- | drivers/net/wireless/hermes.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h index 34ccba2d4354..e1b279e1bf32 100644 --- a/drivers/net/wireless/hermes.h +++ b/drivers/net/wireless/hermes.h | |||
@@ -408,10 +408,13 @@ static inline void hermes_read_words(struct hermes *hw, int off, void *buf, unsi | |||
408 | ioread16_rep(hw->iobase + off, buf, count); | 408 | ioread16_rep(hw->iobase + off, buf, count); |
409 | } | 409 | } |
410 | 410 | ||
411 | static inline void hermes_write_words(struct hermes *hw, int off, const void *buf, unsigned count) | 411 | static inline void hermes_write_bytes(struct hermes *hw, int off, |
412 | const char *buf, unsigned count) | ||
412 | { | 413 | { |
413 | off = off << hw->reg_spacing; | 414 | off = off << hw->reg_spacing; |
414 | iowrite16_rep(hw->iobase + off, buf, count); | 415 | iowrite16_rep(hw->iobase + off, buf, count >> 1); |
416 | if (unlikely(count & 1)) | ||
417 | iowrite8(buf[count - 1], hw->iobase + off); | ||
415 | } | 418 | } |
416 | 419 | ||
417 | static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count) | 420 | static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count) |