NFC: nxp-nci: Include unaligned.h instead of access_ok.h
Subsystems (2)
PATCH 1/1 NFC: nxp-nci: Include unaligned.h instead of access_ok.h
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 hereinclude/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 <[email protected]>
Cc Samuel Ortiz <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/nfc/nxp-nci/firmware.c | 2 +- drivers/nfc/nxp-nci/i2c.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/nfc/nxp-nci/firmware.c +1 -1
@@ -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"
drivers/nfc/nxp-nci/i2c.c +1 -1
@@ -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>
Signature · 1 line
2.1.4