From: Bryan O'Donoghue Date: Thu, 26 Apr 2018 15:41:43 +0100 Subject: [U-Boot] [PATCH] usb: f_mass_storage: Fix compile on x86 Message-ID: <20180426144143.2247-1-pure.logic@nexus-software.ie> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Compiling the f_mass_storage driver for an x86 target results in a compilation error as set_bit and clear_bit are provided by bitops.h Fix that now by only compiling up the local definition of set_bit and clear_bit only if not already provided by the environment. Signed-off-by: Bryan O'Donoghue Cc: Lukasz Majewski Cc: Marek Vasut --- drivers/usb/gadget/f_mass_storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 1ecb92ac6b..2e856af6ed 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -283,6 +283,7 @@ static const char fsg_string_interface[] = "Mass Storage"; struct kref {int x; }; struct completion {int x; }; +#ifndef _I386_BITOPS_H inline void set_bit(int nr, volatile void *addr) { int mask; @@ -302,6 +303,7 @@ inline void clear_bit(int nr, volatile void *addr) mask = 1 << (nr & 0x1f); *a &= ~mask; } +#endif /* _I386_BITOPTS_H */ struct fsg_dev; struct fsg_common; -- 2.17.0