mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nvmem: s32g-ocotp: add OF module alias for autoloading
@ 2026-07-15  1:10 Can Peng
  2026-07-16 21:47 ` Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Can Peng @ 2026-07-15  1:10 UTC (permalink / raw)
  To: srini, error27, ciprianmarian.costea
  Cc: larisa.grigore, ghennadi.procopciuc, linux-kernel, Can Peng

The S32G OCOTP platform driver can be built as a module and uses
ocotp_of_match as its OF match table, but the table is not exported for
module alias generation.

Add the MODULE_DEVICE_TABLE(of, ...) entry so modpost can generate OF
module aliases for OF based module autoloading.

Fixes: 5a356145e968 ("nvmem: s32g-ocotp: Add driver for S32G OCOTP")
Signed-off-by: Can Peng <pengcan@kylinos.cn>
---
 drivers/nvmem/s32g-ocotp-nvmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/s32g-ocotp-nvmem.c b/drivers/nvmem/s32g-ocotp-nvmem.c
index 119871ab3a94..0b57d1b36f29 100644
--- a/drivers/nvmem/s32g-ocotp-nvmem.c
+++ b/drivers/nvmem/s32g-ocotp-nvmem.c
@@ -60,6 +60,7 @@ static const struct of_device_id ocotp_of_match[] = {
 	{ .compatible = "nxp,s32g2-ocotp" },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, ocotp_of_match);
 
 static int s32g_ocotp_probe(struct platform_device *pdev)
 {
-- 
2.53.0


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

* Re: [PATCH] nvmem: s32g-ocotp: add OF module alias for autoloading
  2026-07-15  1:10 [PATCH] nvmem: s32g-ocotp: add OF module alias for autoloading Can Peng
@ 2026-07-16 21:47 ` Srinivas Kandagatla
  0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2026-07-16 21:47 UTC (permalink / raw)
  To: Can Peng, srini, error27, ciprianmarian.costea
  Cc: larisa.grigore, ghennadi.procopciuc, linux-kernel



On 7/15/26 2:10 AM, Can Peng wrote:
> The S32G OCOTP platform driver can be built as a module and uses
> ocotp_of_match as its OF match table, but the table is not exported for
> module alias generation.
> 
> Add the MODULE_DEVICE_TABLE(of, ...) entry so modpost can generate OF
> module aliases for OF based module autoloading.
> 
> Fixes: 5a356145e968 ("nvmem: s32g-ocotp: Add driver for S32G OCOTP")

CC Stable is missing

--srini
> Signed-off-by: Can Peng <pengcan@kylinos.cn>
> ---
>  drivers/nvmem/s32g-ocotp-nvmem.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/nvmem/s32g-ocotp-nvmem.c b/drivers/nvmem/s32g-ocotp-nvmem.c
> index 119871ab3a94..0b57d1b36f29 100644
> --- a/drivers/nvmem/s32g-ocotp-nvmem.c
> +++ b/drivers/nvmem/s32g-ocotp-nvmem.c
> @@ -60,6 +60,7 @@ static const struct of_device_id ocotp_of_match[] = {
>  	{ .compatible = "nxp,s32g2-ocotp" },
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, ocotp_of_match);
>  
>  static int s32g_ocotp_probe(struct platform_device *pdev)
>  {


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

end of thread, other threads:[~2026-07-16 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15  1:10 [PATCH] nvmem: s32g-ocotp: add OF module alias for autoloading Can Peng
2026-07-16 21:47 ` Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome