[PATCH v2] nvmem: s32g-ocotp: add OF module alias for autoloading
From: Can Peng
Date: Fri Jul 17 2026 - 08:22:10 EST
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@xxxxxxxxxxxxxxx
Suggested-by: srini@xxxxxxxxxx
Signed-off-by: Can Peng <pengcan@xxxxxxxxxx>
---
Changes in v2:
- Add Cc stable tag.
- Link to v3: https://lore.kernel.org/all/20260715011047.177743-1-pengcan@xxxxxxxxxx/
---
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