All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit
@ 2016-08-02 12:16 Takashi Iwai
  2016-08-02 12:16 ` [PATCH 2/2] drm/mipi-dsi: Allow to build drm-mipi-dsi as a module Takashi Iwai
  2016-08-04 14:52 ` [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Andrzej Hajda
  0 siblings, 2 replies; 3+ messages in thread
From: Takashi Iwai @ 2016-08-02 12:16 UTC (permalink / raw)
  To: dri-devel; +Cc: Andrzej Hajda, Thierry Reding

This is a preliminary patch for building drm-mipi-dsi as a module.
Add the module exit callback to unregister the bus properly.

Suggested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index f5d80839a90c..e2f3441663be 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -1069,6 +1069,12 @@ static int __init mipi_dsi_bus_init(void)
 }
 postcore_initcall(mipi_dsi_bus_init);
 
+static void __exit mipi_dsi_bus_exit(void)
+{
+	bus_unregister(&mipi_dsi_bus_type);
+}
+module_exit(mipi_dsi_bus_exit);
+
 MODULE_AUTHOR("Andrzej Hajda <a.hajda@samsung.com>");
 MODULE_DESCRIPTION("MIPI DSI Bus");
 MODULE_LICENSE("GPL and additional rights");
-- 
2.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/2] drm/mipi-dsi: Allow to build drm-mipi-dsi as a module
  2016-08-02 12:16 [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Takashi Iwai
@ 2016-08-02 12:16 ` Takashi Iwai
  2016-08-04 14:52 ` [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Andrzej Hajda
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2016-08-02 12:16 UTC (permalink / raw)
  To: dri-devel; +Cc: Andrzej Hajda, Thierry Reding

The drm-mipi-dsi driver has been only built-in although this isn't
strictly required to be so.  Since it's referred by lots of DRM
drivers nowadays, most of distro kernels include the driver as
built-in as a result, even though many systems don't need it at all.

This patch fixes Kconfig to allow drm-mipi-dsi driver built as a
module, so that we can save footprint on systems without such DRM
drivers.  The probe order is managed by the module dependency, and
postcore_initcall() works just fine as a module init call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index fc357319de35..67668a04baf6 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -22,7 +22,7 @@ menuconfig DRM
 	  (/dev/agpgart) support if it is available for your platform.
 
 config DRM_MIPI_DSI
-	bool
+	tristate
 	depends on DRM
 
 config DRM_DP_AUX_CHARDEV
-- 
2.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit
  2016-08-02 12:16 [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Takashi Iwai
  2016-08-02 12:16 ` [PATCH 2/2] drm/mipi-dsi: Allow to build drm-mipi-dsi as a module Takashi Iwai
@ 2016-08-04 14:52 ` Andrzej Hajda
  1 sibling, 0 replies; 3+ messages in thread
From: Andrzej Hajda @ 2016-08-04 14:52 UTC (permalink / raw)
  To: Takashi Iwai, dri-devel; +Cc: Thierry Reding

On 08/02/2016 02:16 PM, Takashi Iwai wrote:
> This is a preliminary patch for building drm-mipi-dsi as a module.
> Add the module exit callback to unregister the bus properly.
>
> Suggested-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

For both patches:

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

--
Regards
Andrzej

> ---
>  drivers/gpu/drm/drm_mipi_dsi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index f5d80839a90c..e2f3441663be 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -1069,6 +1069,12 @@ static int __init mipi_dsi_bus_init(void)
>  }
>  postcore_initcall(mipi_dsi_bus_init);
>  
> +static void __exit mipi_dsi_bus_exit(void)
> +{
> +	bus_unregister(&mipi_dsi_bus_type);
> +}
> +module_exit(mipi_dsi_bus_exit);
> +
>  MODULE_AUTHOR("Andrzej Hajda <a.hajda@samsung.com>");
>  MODULE_DESCRIPTION("MIPI DSI Bus");
>  MODULE_LICENSE("GPL and additional rights");

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-08-04 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 12:16 [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Takashi Iwai
2016-08-02 12:16 ` [PATCH 2/2] drm/mipi-dsi: Allow to build drm-mipi-dsi as a module Takashi Iwai
2016-08-04 14:52 ` [PATCH 1/2] drm/mipi-dsi: Unregister bus at exit Andrzej Hajda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.