diff options
author | Felipe Balbi <balbi@ti.com> | 2013-03-30 12:53:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-30 08:08:40 -0700 |
commit | 727b4ddb48dcd8c9ca81b58ca58191233bdf75aa (patch) | |
tree | 96088a843e63d336a39ce903aa49bec74c56d17a /drivers/usb/chipidea/ci.h | |
parent | ba8618e067907407ec84001adc11bc1f184d19a6 (diff) | |
download | blackbird-op-linux-727b4ddb48dcd8c9ca81b58ca58191233bdf75aa.tar.gz blackbird-op-linux-727b4ddb48dcd8c9ca81b58ca58191233bdf75aa.zip |
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 <balbi@ti.com>
[rebased on top of debug infrastructure rework]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci.h')
-rw-r--r-- | drivers/usb/chipidea/ci.h | 15 |
1 files changed, 1 insertions, 14 deletions
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 @@ -235,19 +235,6 @@ enum ci13xxx_regs { }; /** - * 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 * @mask: bitfield mask @@ -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); |