From 727b4ddb48dcd8c9ca81b58ca58191233bdf75aa Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Sat, 30 Mar 2013 12:53:55 +0200 Subject: usb: chipidea: don't redefine __ffs() chipidea's ffs_nr() is pretty much what __ffs() does. Use that one instead. Signed-off-by: Felipe Balbi [rebased on top of debug infrastructure rework] Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/ci.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'drivers/usb/chipidea/ci.h') diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index c7d4622782ce..68577d1f1c0d 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -234,19 +234,6 @@ enum ci13xxx_regs { OP_LAST = OP_ENDPTCTRL + ENDPT_MAX / 2, }; -/** - * ffs_nr: find first (least significant) bit set - * @x: the word to search - * - * This function returns bit number (instead of position) - */ -static inline int ffs_nr(u32 x) -{ - int n = ffs(x); - - return n ? n-1 : 32; -} - /** * hw_read: reads from a hw register * @reg: register index @@ -305,7 +292,7 @@ static inline u32 hw_test_and_write(struct ci13xxx *ci, enum ci13xxx_regs reg, u32 val = hw_read(ci, reg, ~0); hw_write(ci, reg, mask, data); - return (val & mask) >> ffs_nr(mask); + return (val & mask) >> __ffs(mask); } int hw_device_reset(struct ci13xxx *ci, u32 mode); -- cgit