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/core.c | |
parent | ba8618e067907407ec84001adc11bc1f184d19a6 (diff) | |
download | op-kernel-dev-727b4ddb48dcd8c9ca81b58ca58191233bdf75aa.zip op-kernel-dev-727b4ddb48dcd8c9ca81b58ca58191233bdf75aa.tar.gz |
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/core.c')
-rw-r--r-- | drivers/usb/chipidea/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index a7ce1b8..114d4c4 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -155,7 +155,7 @@ int hw_port_test_set(struct ci13xxx *ci, u8 mode) if (mode > TEST_MODE_MAX) return -EINVAL; - hw_write(ci, OP_PORTSC, PORTSC_PTC, mode << ffs_nr(PORTSC_PTC)); + hw_write(ci, OP_PORTSC, PORTSC_PTC, mode << __ffs(PORTSC_PTC)); return 0; } @@ -166,7 +166,7 @@ int hw_port_test_set(struct ci13xxx *ci, u8 mode) */ u8 hw_port_test_get(struct ci13xxx *ci) { - return hw_read(ci, OP_PORTSC, PORTSC_PTC) >> ffs_nr(PORTSC_PTC); + return hw_read(ci, OP_PORTSC, PORTSC_PTC) >> __ffs(PORTSC_PTC); } static int hw_device_init(struct ci13xxx *ci, void __iomem *base) @@ -182,7 +182,7 @@ static int hw_device_init(struct ci13xxx *ci, void __iomem *base) hw_alloc_regmap(ci, false); reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >> - ffs_nr(HCCPARAMS_LEN); + __ffs(HCCPARAMS_LEN); ci->hw_bank.lpm = reg; hw_alloc_regmap(ci, !!reg); ci->hw_bank.size = ci->hw_bank.op - ci->hw_bank.abs; @@ -190,7 +190,7 @@ static int hw_device_init(struct ci13xxx *ci, void __iomem *base) ci->hw_bank.size /= sizeof(u32); reg = hw_read(ci, CAP_DCCPARAMS, DCCPARAMS_DEN) >> - ffs_nr(DCCPARAMS_DEN); + __ffs(DCCPARAMS_DEN); ci->hw_ep_max = reg * 2; /* cache hw ENDPT_MAX */ if (ci->hw_ep_max > ENDPT_MAX) |