Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Dmitry Torokhov
82940064 4eec8772

+2 -2
+2 -2
drivers/input/misc/gpio_decoder.c
··· 60 60 struct device *dev = &pdev->dev; 61 61 struct gpio_decoder *decoder; 62 62 struct input_dev *input; 63 - u32 max; 63 + u32 max; 64 64 int err; 65 65 66 66 decoder = devm_kzalloc(dev, sizeof(*decoder), GFP_KERNEL); ··· 82 82 return dev_err_probe(dev, -EINVAL, "too many gpios found\n"); 83 83 84 84 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; 86 86 87 87 input = devm_input_allocate_device(dev); 88 88 if (!input)