drivers/gpio/gpio-sifive.c | 1 + 1 file changed, 1 insertion(+)
Add MODULE_DEVICE_TABLE() so the driver module can be loaded
automatically based on a compatible string alias.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
drivers/gpio/gpio-sifive.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index 94ef2efbd14f..e9a992cd4b9c 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -260,6 +260,7 @@ static const struct of_device_id sifive_gpio_match[] = {
{ .compatible = "sifive,fu540-c000-gpio" },
{ },
};
+MODULE_DEVICE_TABLE(of, sifive_gpio_match);
static struct platform_driver sifive_gpio_driver = {
.probe = sifive_gpio_probe,
--
2.47.2
base-commit: 5a6f65d1502551f84c158789e5d89299c78907c7
branch: up/gpio-autoload
On Thu, Oct 16, 2025 at 2:36 AM Samuel Holland
<samuel.holland@sifive.com> wrote:
>
> Add MODULE_DEVICE_TABLE() so the driver module can be loaded
> automatically based on a compatible string alias.
>
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
> ---
>
> drivers/gpio/gpio-sifive.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
> index 94ef2efbd14f..e9a992cd4b9c 100644
> --- a/drivers/gpio/gpio-sifive.c
> +++ b/drivers/gpio/gpio-sifive.c
> @@ -260,6 +260,7 @@ static const struct of_device_id sifive_gpio_match[] = {
> { .compatible = "sifive,fu540-c000-gpio" },
> { },
> };
> +MODULE_DEVICE_TABLE(of, sifive_gpio_match);
>
> static struct platform_driver sifive_gpio_driver = {
> .probe = sifive_gpio_probe,
> --
> 2.47.2
It looks like it should have been part of commit 6b4c76ded358 ("gpio:
sifive: Allow building the driver as a module") in the first place. If
that's the case, would you mind resending with a Fixes: and Cc: stable
tags?
Bart
© 2016 - 2025 Red Hat, Inc.