File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 7
7
#include <linux/module.h>
8
8
#include <linux/regmap.h>
9
9
#include <linux/spi/spi.h>
10
+ #include <linux/swab.h>
10
11
11
12
/*
12
13
* This driver implements the regmap operations for a generic SPI
@@ -162,19 +163,12 @@ struct spi_avmm_bridge {
162
163
/* bridge buffer used in translation between protocol layers */
163
164
char trans_buf [TRANS_BUF_SIZE ];
164
165
char phy_buf [PHY_BUF_SIZE ];
165
- void (* swap_words )(char * buf , unsigned int len );
166
+ void (* swap_words )(void * buf , unsigned int len );
166
167
};
167
168
168
- static void br_swap_words_32 (char * buf , unsigned int len )
169
+ static void br_swap_words_32 (void * buf , unsigned int len )
169
170
{
170
- u32 * p = (u32 * )buf ;
171
- unsigned int count ;
172
-
173
- count = len / 4 ;
174
- while (count -- ) {
175
- * p = swab32p (p );
176
- p ++ ;
177
- }
171
+ swab32_array (buf , len / 4 );
178
172
}
179
173
180
174
/*
You can’t perform that action at this time.
0 commit comments