Re: [PATCH] nvmem: s32g-ocotp: add OF module alias for autoloading

From: Srinivas Kandagatla

Date: Thu Jul 16 2026 - 17:47:36 EST




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@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)
> {