NFC: nxp-nci: Include unaligned.h instead of access_ok.h
authorGuenter Roeck <linux@roeck-us.net>
Sat, 1 Aug 2015 13:59:29 +0000 (06:59 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sat, 1 Apr 2017 21:52:25 +0000 (23:52 +0200)
Directly including access_ok.h can result in the following compile errors
if an architecture such as ia64 does not support direct unaligned accesses.

include/linux/unaligned/access_ok.h:7:19: error:
redefinition of 'get_unaligned_le16'
include/linux/unaligned/le_struct.h:6:19: note:
previous definition of 'get_unaligned_le16' was here
include/linux/unaligned/access_ok.h:12:19: error:
redefinition of 'get_unaligned_le32'
include/linux/unaligned/le_struct.h:11:19: note:
previous definition of 'get_unaligned_le32' was here

Include asm/unaligned.h instead and let the architecture decide which
access functions to use.

Cc: Clément Perrochaud <clement.perrochaud@effinnov.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/nxp-nci/firmware.c
drivers/nfc/nxp-nci/i2c.c

index 5291797324bae0752098a15b6b3f7221c612b8ce..553011f583395f609b48f591289d0025a2975551 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/completion.h>
 #include <linux/firmware.h>
 #include <linux/nfc.h>
-#include <linux/unaligned/access_ok.h>
+#include <asm/unaligned.h>
 
 #include "nxp-nci.h"
 
index 36099e557730e3cb47b151a36e02fc901b38f518..06a157c63416acf434b5a0a6cdb21fc9d2b5a8d1 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <linux/platform_data/nxp-nci.h>
-#include <linux/unaligned/access_ok.h>
+#include <asm/unaligned.h>
 
 #include <net/nfc/nfc.h>