mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
platform: cznic: use ffs() instead of __bf_shf()
__bf_shf() on a 64-bit variable causes a link failure during compile-testing: drivers-platform-cznic-turris-omnia-mcu-gpio.c:(.text):undefined-reference-to-__ffsdi2 Open-code this using ffs()-1, which has the same result but avoids the library call. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
6429892873
commit
b24e88b42d
|
|
@ -1104,7 +1104,7 @@ int omnia_mcu_request_irq(struct omnia_mcu *mcu, u32 spec,
|
|||
if (!spec)
|
||||
return -EINVAL;
|
||||
|
||||
irq_idx = omnia_int_to_gpio_idx[__bf_shf(spec)];
|
||||
irq_idx = omnia_int_to_gpio_idx[ffs(spec) - 1];
|
||||
irq = gpiod_to_irq(gpio_device_get_desc(mcu->gc.gpiodev, irq_idx));
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user