]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Input: gpio_decoder - make use of the macros from bits.h
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 13 Nov 2025 15:44:45 +0000 (16:44 +0100)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 21 Jan 2026 20:22:43 +0000 (12:22 -0800)
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>
drivers/input/misc/gpio_decoder.c

index 7f319b9325503b182b3d8d7d3554946e5e6016d2..057717de9849317934b40b55d1160597e7726e62 100644 (file)
@@ -60,7 +60,7 @@ static int gpio_decoder_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct gpio_decoder *decoder;
        struct input_dev *input;
-       u32  max;
+       u32 max;
        int err;
 
        decoder = devm_kzalloc(dev, sizeof(*decoder), GFP_KERNEL);
@@ -82,7 +82,7 @@ static int gpio_decoder_probe(struct platform_device *pdev)
                return dev_err_probe(dev, -EINVAL, "too many gpios found\n");
 
        if (device_property_read_u32(dev, "decoder-max-value", &max))
-               max = (1U << decoder->input_gpios->ndescs) - 1;
+               max = BIT(decoder->input_gpios->ndescs) - 1;
 
        input = devm_input_allocate_device(dev);
        if (!input)