pinctrl: starfive: Correct driver declaration for starfive_gpio
authorHal Feng <hal.feng@starfivetech.com>
Thu, 16 Jan 2025 03:45:34 +0000 (11:45 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 3 Feb 2025 03:33:04 +0000 (11:33 +0800)
Use the driver macros so that the driver appears in the
linker list.

Reported-by: Simon Glass <sjg@chromium.org>
Fixes: 732f01aabf53 ("pinctrl: starfive: Add StarFive JH7110 driver")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
drivers/pinctrl/starfive/pinctrl-starfive.c

index 95b1a75..1b942e6 100644 (file)
@@ -348,7 +348,7 @@ static const struct dm_gpio_ops starfive_gpio_ops = {
        .set_value = starfive_gpio_set_value,
 };
 
-static struct driver starfive_gpio_driver = {
+U_BOOT_DRIVER(starfive_gpio) = {
        .name = "starfive_gpio",
        .id = UCLASS_GPIO,
        .probe = starfive_gpio_probe,
@@ -367,7 +367,7 @@ static int starfive_gpiochip_register(struct udevice *parent)
                return -ENOENT;
 
        node = dev_ofnode(parent);
-       ret = device_bind_with_driver_data(parent, &starfive_gpio_driver,
+       ret = device_bind_with_driver_data(parent, DM_DRIVER_REF(starfive_gpio),
                                           "starfive_gpio", 0, node, &dev);
 
        return (ret == 0) ? 0 : ret;