* [PATCH v1] pinctrl: starfive: Correct driver declaration for starfive_gpio
@ 2025-01-16 3:45 Hal Feng
2025-01-16 19:18 ` Anand Moon
0 siblings, 1 reply; 2+ messages in thread
From: Hal Feng @ 2025-01-16 3:45 UTC (permalink / raw)
To: Leo, Tom Rini, Peter Robinson, Simon Glass, Sumit Garg, Rick Chen
Cc: Hal Feng, u-boot
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>
---
drivers/pinctrl/starfive/pinctrl-starfive.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive.c b/drivers/pinctrl/starfive/pinctrl-starfive.c
index 95b1a752de2..1b942e6f045 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive.c
@@ -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;
base-commit: 178f6ecb21fe12ada74a9a1a08093c812b15eea5
--
2.43.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] pinctrl: starfive: Correct driver declaration for starfive_gpio
2025-01-16 3:45 [PATCH v1] pinctrl: starfive: Correct driver declaration for starfive_gpio Hal Feng
@ 2025-01-16 19:18 ` Anand Moon
0 siblings, 0 replies; 2+ messages in thread
From: Anand Moon @ 2025-01-16 19:18 UTC (permalink / raw)
To: Hal Feng
Cc: Leo, Tom Rini, Peter Robinson, Simon Glass, Sumit Garg, Rick Chen,
u-boot
Hi Hal Feng,
On Thu, 16 Jan 2025 at 18:37, Hal Feng <hal.feng@starfivetech.com> wrote:
>
> 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>
> ---
> drivers/pinctrl/starfive/pinctrl-starfive.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive.c b/drivers/pinctrl/starfive/pinctrl-starfive.c
> index 95b1a752de2..1b942e6f045 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive.c
> @@ -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;
>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Thanks
-Anand
> base-commit: 178f6ecb21fe12ada74a9a1a08093c812b15eea5
> --
> 2.43.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-16 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 3:45 [PATCH v1] pinctrl: starfive: Correct driver declaration for starfive_gpio Hal Feng
2025-01-16 19:18 ` Anand Moon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox