diff mbox series

[U-Boot,v3,9/9] usb: composite convert __set_bit to generic_set_bit

Message ID 20180430145610.18250-10-pure.logic@nexus-software.ie
State Accepted
Delegated to: Tom Rini
Headers show
Series Fixup set_bit/clear_bit definition and usage | expand

Commit Message

Bryan O'Donoghue April 30, 2018, 2:56 p.m. UTC
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

To address that situation we discussed on the list moving to
genetic_set_bit() instead.

Doing a quick grep for similar situations in drivers/usb shows that the
composite device is using __set_bit().

This patch switches over to generic_set_bit to maintain consistency between
the two gadget drivers.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
---
 drivers/usb/gadget/composite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini May 16, 2018, 12:50 p.m. UTC | #1
On Mon, Apr 30, 2018 at 03:56:10PM +0100, Bryan O'Donoghue wrote:

> 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
> 
> To address that situation we discussed on the list moving to
> genetic_set_bit() instead.
> 
> Doing a quick grep for similar situations in drivers/usb shows that the
> composite device is using __set_bit().
> 
> This patch switches over to generic_set_bit to maintain consistency between
> the two gadget drivers.
> 
> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index a87639def9..9229d9ee30 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -379,7 +379,7 @@  static int set_config(struct usb_composite_dev *cdev,
 			ep = (struct usb_endpoint_descriptor *)*descriptors;
 			addr = ((ep->bEndpointAddress & 0x80) >> 3)
 			     |	(ep->bEndpointAddress & 0x0f);
-			__set_bit(addr, f->endpoints);
+			generic_set_bit(addr, f->endpoints);
 		}
 
 		result = f->set_alt(f, tmp, 0);