Skip to content

Commit

Permalink
drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "acc…
Browse files Browse the repository at this point in the history
…ess_ok.h" in "rtl819x_BAProc.c"

"asm/unaligned.h" is more generic than "access_ok.h", and it may include
"access_ok.h", so need use it instead of "access_ok.h".

During building, "rtllib.h" has already include "asm/unaligned.h", so
will cause building issue. The related error (with allmodconfig under
parisc):

    CC [M]  drivers/staging/rtl8192e/rtl819x_BAProc.o
  In file included from ./arch/parisc/include/asm/unaligned.h:4:0,
                   from include/linux/ieee80211.h:22,
                   from include/net/lib80211.h:31,
                   from drivers/staging/rtl8192e/rtllib.h:45,
                   from drivers/staging/rtl8192e/rtl819x_BAProc.c:20:
  include/linux/unaligned/be_struct.h:6:19: error: redefinition of 'get_unaligned_be16'
   static inline u16 get_unaligned_be16(const void *p)
                   ^
  In file included from drivers/staging/rtl8192e/rtl819x_BAProc.c:19:0:
  include/linux/unaligned/access_ok.h:22:19: note: previous definition of 'get_unaligned_be16' was here
   static inline u16 get_unaligned_be16(const void *p)
                   ^
  ...

For independent from other include files, still suggest it includes
"asm/unaligned.h" too. And also include "asm/byteorder.h" since it is
the first include file".

Signed-off-by: Chen Gang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Chen-Gang authored and gregkh committed Dec 3, 2014
1 parent 73df998 commit 3ec16e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/rtl8192e/rtl819x_BAProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
* Contact Information:
* wlanfae <[email protected]>
******************************************************************************/
#include <linux/unaligned/access_ok.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include "rtllib.h"
#include "rtl819x_BA.h"

Expand Down

0 comments on commit 3ec16e9

Please sign in to comment.