2020-05-04 06:37:20

by H. Nikolaus Schaller

[permalink] [raw]
Subject: [PATCH] drm: ingenic-drm: add MODULE_DEVICE_TABLE

so that the driver can load by matching the device tree
if compiled as module.

Cc: [email protected] # v5.3+
Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs")
Signed-off-by: H. Nikolaus Schaller <[email protected]>
---
drivers/gpu/drm/ingenic/ingenic-drm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index 9dfe7cb530e11..1754c05470690 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = {
{ .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);

static struct platform_driver ingenic_drm_driver = {
.driver = {
--
2.26.2


2020-05-04 14:50:29

by Paul Cercueil

[permalink] [raw]
Subject: Re: [PATCH] drm: ingenic-drm: add MODULE_DEVICE_TABLE

Hi Nikolaus,


Le lun. 4 mai 2020 ? 8:35, H. Nikolaus Schaller <[email protected]> a
?crit :
> so that the driver can load by matching the device tree
> if compiled as module.
>
> Cc: [email protected] # v5.3+
> Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx
> SoCs")
> Signed-off-by: H. Nikolaus Schaller <[email protected]>

Applied, thanks.

-Paul

> ---
> drivers/gpu/drm/ingenic/ingenic-drm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c
> b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index 9dfe7cb530e11..1754c05470690 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -843,6 +843,7 @@ static const struct of_device_id
> ingenic_drm_of_match[] = {
> { .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info },
> { /* sentinel */ },
> };
> +MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);
>
> static struct platform_driver ingenic_drm_driver = {
> .driver = {
> --
> 2.26.2
>