diff options
author | Pavel Roskin <proski@gnu.org> | 2006-04-07 10:10:39 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 22:15:50 +0200 |
commit | 6b61626290900f12b7f3978f57f329da6811fb59 (patch) | |
tree | 2e1d9518d786bbca0e87ffec3f42a6f5794fe384 /drivers/net/wireless/hermes.h | |
parent | [PATCH] orinoco: orinoco_xmit() should only return valid symbolic constants (diff) | |
download | linux-6b61626290900f12b7f3978f57f329da6811fb59.tar.xz linux-6b61626290900f12b7f3978f57f329da6811fb59.zip |
[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 ioread16_rep(hw->iobase + off, buf, count); } -static inline void hermes_write_words(struct hermes *hw, int off, const void *buf, unsigned count) +static inline void hermes_write_bytes(struct hermes *hw, int off, + const char *buf, unsigned count) { off = off << hw->reg_spacing; - iowrite16_rep(hw->iobase + off, buf, count); + iowrite16_rep(hw->iobase + off, buf, count >> 1); + if (unlikely(count & 1)) + iowrite8(buf[count - 1], hw->iobase + off); } static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count) |