Skip to content

Commit 8294006

Browse files
andy-shevdtor
authored andcommitted
Input: gpio_decoder - make use of the macros from bits.h
Make use of BIT() where it makes sense. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251113154616.3107676-5-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 4eec877 commit 8294006

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/input/misc/gpio_decoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static int gpio_decoder_probe(struct platform_device *pdev)
6060
struct device *dev = &pdev->dev;
6161
struct gpio_decoder *decoder;
6262
struct input_dev *input;
63-
u32 max;
63+
u32 max;
6464
int err;
6565

6666
decoder = devm_kzalloc(dev, sizeof(*decoder), GFP_KERNEL);
@@ -82,7 +82,7 @@ static int gpio_decoder_probe(struct platform_device *pdev)
8282
return dev_err_probe(dev, -EINVAL, "too many gpios found\n");
8383

8484
if (device_property_read_u32(dev, "decoder-max-value", &max))
85-
max = (1U << decoder->input_gpios->ndescs) - 1;
85+
max = BIT(decoder->input_gpios->ndescs) - 1;
8686

8787
input = devm_input_allocate_device(dev);
8888
if (!input)

0 commit comments

Comments
 (0)