diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-11-09 22:53:31 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-11-16 14:14:35 +0200 |
commit | 2c4d00cb8fc5e01004eb2e84d13c09a2d9ecab0f (patch) | |
tree | d6bcbd51b05f7ee45367bf37d8e51afe14d6db33 /drivers/gpio | |
parent | 74301f2781586d0e6669466b2b4d59d94c63fa5a (diff) |
gpiolib: acpi: Use BIT() macro to increase readability
We may use BIT() macro to increase readability in
acpi_gpio_adr_space_handler().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index a556e2ec0a39..6cc5f91bfe2e 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1101,8 +1101,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address, mutex_unlock(&achip->conn_lock); if (function == ACPI_WRITE) - gpiod_set_raw_value_cansleep(desc, - !!((1 << i) & *value)); + gpiod_set_raw_value_cansleep(desc, !!(*value & BIT(i))); else *value |= (u64)gpiod_get_raw_value_cansleep(desc) << i; } |