Patch "gpio: mxc: remove dead code after switch to DT-only" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpio: mxc: remove dead code after switch to DT-only

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpio-mxc-remove-dead-code-after-switch-to-dt-only.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f26a514f2f2554e5e776348e1837370849d9ad85
Author: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
Date:   Mon Jan 13 23:19:11 2025 +0100

    gpio: mxc: remove dead code after switch to DT-only
    
    [ Upstream commit b049e7abe9001a780d58e78e3833dcceee22f396 ]
    
    struct platform_device::id was only set by board code, but since i.MX
    became a devicetree-only platform, this will always be -1
    (PLATFORM_DEVID_NONE).
    
    Note: of_alias_get_id() returns a negative number on error and base
    treats all negative errors the same, so we need not add any additional
    error handling.
    
    Fixes: 0f2c7af45d7e ("gpio: mxc: Convert the driver to DT-only")
    Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20250113-b4-imx-gpio-base-warning-v1-3-0a28731a5cf6@xxxxxxxxxxxxxx
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 853d9aa6b3b1f..d456077c74f2f 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -445,8 +445,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
 	port->gc.request = gpiochip_generic_request;
 	port->gc.free = gpiochip_generic_free;
 	port->gc.to_irq = mxc_gpio_to_irq;
-	port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 :
-					     pdev->id * 32;
+	port->gc.base = of_alias_get_id(np, "gpio") * 32;
 
 	err = devm_gpiochip_add_data(&pdev->dev, &port->gc, port);
 	if (err)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux