From: Simon Glass Date: Sat, 13 Nov 2021 14:07:15 +0000 (-0700) Subject: pinctrl: meson: Correct the driver GPIO declaration X-Git-Tag: v2025.01-rc5-pxa1908~1628^2~2 X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=886d36efdb98bc0bb44e65e917dea903ab377e54;p=u-boot.git pinctrl: meson: Correct the driver GPIO declaration 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 Fixes: 7c9dcfed50f ("pinctrl: meson: rework gx pmx function") Reported-by: Tom Rini Tested-by: Tom Rini on libretech-cc Signed-off-by: Neil Armstrong --- diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c index 159f3406a2..99502d89c6 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c @@ -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, diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx.h b/drivers/pinctrl/meson/pinctrl-meson-gx.h index 4c1aa1a300..c70c1f51c6 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gx.h +++ b/drivers/pinctrl/meson/pinctrl-meson-gx.h @@ -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__ */ diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c index 8c01c73906..93a895c9fa 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c @@ -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[] = { diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c index 51a0b4c5ca..a44145e2d4 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c @@ -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[] = {