Commit 76e6f2526ff69eba466f583d94beb7cf6b0bddd6
Committed by
Linus Torvalds
1 parent
a064d5bdd0
Exists in
master
and in
7 other branches
usb/c67x00 endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff
drivers/usb/c67x00/c67x00-ll-hpi.c
... | ... | @@ -120,7 +120,7 @@ |
120 | 120 | * Only data is little endian, addr has cpu endianess |
121 | 121 | */ |
122 | 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 | 125 | unsigned long flags; |
126 | 126 | int i; |
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | |
130 | 130 | hpi_write_reg(dev, HPI_ADDR, addr); |
131 | 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 | 134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
135 | 135 | } |
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | * Only data is little endian, addr has cpu endianess |
139 | 139 | */ |
140 | 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 | 143 | unsigned long flags; |
144 | 144 | int i; |
... | ... | @@ -146,7 +146,7 @@ |
146 | 146 | spin_lock_irqsave(&dev->hpi.lock, flags); |
147 | 147 | hpi_write_reg(dev, HPI_ADDR, addr); |
148 | 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 | 151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
152 | 152 | } |
... | ... | @@ -425,7 +425,7 @@ |
425 | 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 | 429 | buf += len & ~0x01; |
430 | 430 | addr += len & ~0x01; |
431 | 431 | len &= 0x01; |
... | ... | @@ -456,7 +456,7 @@ |
456 | 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 | 460 | buf += len & ~0x01; |
461 | 461 | addr += len & ~0x01; |
462 | 462 | len &= 0x01; |