]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: meson: Correct the driver GPIO declaration
authorSimon Glass <sjg@chromium.org>
Sat, 13 Nov 2021 14:07:15 +0000 (07:07 -0700)
committerNeil Armstrong <narmstrong@baylibre.com>
Fri, 19 Nov 2021 17:15:26 +0000 (18:15 +0100)
This should use the provided U_BOOT_DRIVER() macro so that the driver gets
added to the appropriate linker list. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7c9dcfed50f ("pinctrl: meson: rework gx pmx function")
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com> on libretech-cc
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
drivers/pinctrl/meson/pinctrl-meson-gx.h
drivers/pinctrl/meson/pinctrl-meson-gxbb.c
drivers/pinctrl/meson/pinctrl-meson-gxl.c

index 159f3406a203e59649c13810d561bb15c7cf5c38..99502d89c6c09e68be0b9af5cd570fd530901913 100644 (file)
@@ -145,7 +145,7 @@ static const struct dm_gpio_ops meson_gx_gpio_ops = {
        .direction_output = meson_gpio_direction_output,
 };
 
-const struct driver meson_gx_gpio_driver = {
+U_BOOT_DRIVER(meson_gx_gpio_driver) = {
        .name   = "meson-gx-gpio",
        .id     = UCLASS_GPIO,
        .probe  = meson_gpio_probe,
index 4c1aa1a3002a96217332bb63211fb79cf874e06b..c70c1f51c6de1115ab638ef5fb974592dca42045 100644 (file)
@@ -43,6 +43,6 @@ struct meson_gx_pmx_data {
        }
 
 extern const struct pinctrl_ops meson_gx_pinctrl_ops;
-extern const struct driver meson_gx_gpio_driver;
+extern U_BOOT_DRIVER(meson_gx_gpio_driver);
 
 #endif /* __PINCTRL_MESON_GX_H__ */
index 8c01c739068a2a52bcec6804437075d4d0810e40..93a895c9fa7f3725f588cf8540f2dff499f8c728 100644 (file)
@@ -439,7 +439,7 @@ struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
        .num_groups     = ARRAY_SIZE(meson_gxbb_periphs_groups),
        .num_funcs      = ARRAY_SIZE(meson_gxbb_periphs_functions),
        .num_banks      = ARRAY_SIZE(meson_gxbb_periphs_banks),
-       .gpio_driver    = &meson_gx_gpio_driver,
+       .gpio_driver    = DM_DRIVER_REF(meson_gx_gpio_driver),
 };
 
 struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = {
@@ -452,7 +452,7 @@ struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = {
        .num_groups     = ARRAY_SIZE(meson_gxbb_aobus_groups),
        .num_funcs      = ARRAY_SIZE(meson_gxbb_aobus_functions),
        .num_banks      = ARRAY_SIZE(meson_gxbb_aobus_banks),
-       .gpio_driver    = &meson_gx_gpio_driver,
+       .gpio_driver    = DM_DRIVER_REF(meson_gx_gpio_driver),
 };
 
 static const struct udevice_id meson_gxbb_pinctrl_match[] = {
index 51a0b4c5cadf0d5303013854186be4109d98db6b..a44145e2d4e80293f3ed52f68627e471fa564a3c 100644 (file)
@@ -701,7 +701,7 @@ struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = {
        .num_groups     = ARRAY_SIZE(meson_gxl_periphs_groups),
        .num_funcs      = ARRAY_SIZE(meson_gxl_periphs_functions),
        .num_banks      = ARRAY_SIZE(meson_gxl_periphs_banks),
-       .gpio_driver    = &meson_gx_gpio_driver,
+       .gpio_driver    = DM_DRIVER_REF(meson_gx_gpio_driver),
 };
 
 struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = {
@@ -714,7 +714,7 @@ struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = {
        .num_groups     = ARRAY_SIZE(meson_gxl_aobus_groups),
        .num_funcs      = ARRAY_SIZE(meson_gxl_aobus_functions),
        .num_banks      = ARRAY_SIZE(meson_gxl_aobus_banks),
-       .gpio_driver    = &meson_gx_gpio_driver,
+       .gpio_driver    = DM_DRIVER_REF(meson_gx_gpio_driver),
 };
 
 static const struct udevice_id meson_gxl_pinctrl_match[] = {