pinctrl: starfive: Correct driver declaration for starfive_gpio
PATCH 1/1 pinctrl: starfive: Correct driver declaration for starfive_gpio
Use the driver macros so that the driver appears in the linker list.
Reported-by Simon Glass <[email protected]>
Fixes 732f01aabf53 ("pinctrl: starfive: Add StarFive JH7110 driver")
Signed-off-by Hal Feng <[email protected]>
--- drivers/pinctrl/starfive/pinctrl-starfive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/starfive/pinctrl-starfive.c +2 -2
@@ -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
Signature · 1 line
2.43.2
Hi Hal Feng,
Quoted 26 lines · Hal Feng
Use the driver macros so that the driver appears in the linker list.
Reported-by Simon Glass <[email protected]>Fixes 732f01aabf53 ("pinctrl: starfive: Add StarFive JH7110 driver")Signed-off-by Hal Feng <[email protected]>--- drivers/pinctrl/starfive/pinctrl-starfive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pinctrl/starfive/pinctrl-starfive.c +1
-1@@ -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,
drivers/pinctrl/starfive/pinctrl-starfive.c static int starfive_gpiochip_register(struct udevice *parent) · line 373
Quoted 8 lines
drivers/pinctrl/starfive/pinctrl-starfive.c +1
-1@@ -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 <[email protected]>
Thanks
-Anand
Quoted 5 lines
base-commit:
178f6ecb21fe12ada74a9a1a08093c812b15eea5--
2.43.2