diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-06-02 05:59:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-04 11:06:01 -0400 |
commit | 76e6f2526ff69eba466f583d94beb7cf6b0bddd6 (patch) | |
tree | a2d7603ad4f9a2dbcba789a305717ce6c4844cc9 | |
parent | a064d5bdd0c9602e4cd930ad949392640b37dda7 (diff) |
usb/c67x00 endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/usb/c67x00/c67x00-ll-hpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c index 5100fbbf6cb0..a9636f43bca2 100644 --- a/drivers/usb/c67x00/c67x00-ll-hpi.c +++ b/drivers/usb/c67x00/c67x00-ll-hpi.c | |||
@@ -120,7 +120,7 @@ static void hpi_write_word(struct c67x00_device *dev, u16 reg, u16 value) | |||
120 | * Only data is little endian, addr has cpu endianess | 120 | * Only data is little endian, addr has cpu endianess |
121 | */ | 121 | */ |
122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | 122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, |
123 | u16 *data, u16 count) | 123 | __le16 *data, u16 count) |
124 | { | 124 | { |
125 | unsigned long flags; | 125 | unsigned long flags; |
126 | int i; | 126 | int i; |
@@ -129,7 +129,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
129 | 129 | ||
130 | hpi_write_reg(dev, HPI_ADDR, addr); | 130 | hpi_write_reg(dev, HPI_ADDR, addr); |
131 | for (i = 0; i < count; i++) | 131 | for (i = 0; i < count; i++) |
132 | hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++)); | 132 | hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++)); |
133 | 133 | ||
134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
135 | } | 135 | } |
@@ -138,7 +138,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
138 | * Only data is little endian, addr has cpu endianess | 138 | * Only data is little endian, addr has cpu endianess |
139 | */ | 139 | */ |
140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | 140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, |
141 | u16 *data, u16 count) | 141 | __le16 *data, u16 count) |
142 | { | 142 | { |
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | int i; | 144 | int i; |
@@ -146,7 +146,7 @@ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | |||
146 | spin_lock_irqsave(&dev->hpi.lock, flags); | 146 | spin_lock_irqsave(&dev->hpi.lock, flags); |
147 | hpi_write_reg(dev, HPI_ADDR, addr); | 147 | hpi_write_reg(dev, HPI_ADDR, addr); |
148 | for (i = 0; i < count; i++) | 148 | for (i = 0; i < count; i++) |
149 | *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA)); | 149 | *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA)); |
150 | 150 | ||
151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
152 | } | 152 | } |
@@ -425,7 +425,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr, | |||
425 | len--; | 425 | len--; |
426 | } | 426 | } |
427 | 427 | ||
428 | hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2); | 428 | hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2); |
429 | buf += len & ~0x01; | 429 | buf += len & ~0x01; |
430 | addr += len & ~0x01; | 430 | addr += len & ~0x01; |
431 | len &= 0x01; | 431 | len &= 0x01; |
@@ -456,7 +456,7 @@ void c67x00_ll_read_mem_le16(struct c67x00_device *dev, u16 addr, | |||
456 | len--; | 456 | len--; |
457 | } | 457 | } |
458 | 458 | ||
459 | hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2); | 459 | hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2); |
460 | buf += len & ~0x01; | 460 | buf += len & ~0x01; |
461 | addr += len & ~0x01; | 461 | addr += len & ~0x01; |
462 | len &= 0x01; | 462 | len &= 0x01; |