linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: sifive: Support module autoloading
@ 2025-10-16  0:36 Samuel Holland
  2025-10-16  9:59 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2025-10-16  0:36 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Samuel Holland, Paul Walmsley, linux-gpio, linux-kernel,
	linux-riscv

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: sifive: Support module autoloading
  2025-10-16  0:36 [PATCH] gpio: sifive: Support module autoloading Samuel Holland
@ 2025-10-16  9:59 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-10-16  9:59 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Linus Walleij, Paul Walmsley, linux-gpio, linux-kernel,
	linux-riscv

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-16  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16  0:36 [PATCH] gpio: sifive: Support module autoloading Samuel Holland
2025-10-16  9:59 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).