[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>
This commit is contained in:
Pavel Roskin
2006-04-07 04:10:39 -04:00
committed by John W. Linville
parent b34b867e94
commit 6b61626290
3 changed files with 16 additions and 15 deletions

View File

@@ -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)