On 14/12/16 01:38, Laurent Pinchart wrote:
> The omapdrm platform device is a virtual device created for the sole
> purpose of handling the omapdss/omapdrm driver split. It should
> eventually be removed. As a first step to ease refactoring move its
> registration from platform code to driver code.
> 
> The omapdrm driver name must be changed internally to avoid probing both
> the device registered in platform code and the device registered in the
> omapdss driver, as that would otherwise break bisection.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/core.c | 17 +++++++++++++++++
>  drivers/gpu/drm/omapdrm/omap_drv.c |  2 +-
>  2 files changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/core.c 
> b/drivers/gpu/drm/omapdrm/dss/core.c
> index 1bf978b5c5bc..b7c44b85b7c3 100644
> --- a/drivers/gpu/drm/omapdrm/dss/core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/core.c
> @@ -22,6 +22,7 @@
>  
>  #define DSS_SUBSYS_NAME "CORE"
>  
> +#include <linux/dma-mapping.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/clk.h>
> @@ -285,6 +286,16 @@ static void (*dss_output_drv_unreg_funcs[])(void) = {
>       dss_uninit_platform_driver,
>  };
>  
> +#if IS_ENABLED(CONFIG_DRM_OMAP)

The #ifs are not needed, don't compile this file if there's no DRM_OMAP.

> +static struct platform_device omap_drm_device = {
> +     .dev = {
> +             .coherent_dma_mask = DMA_BIT_MASK(32),
> +     },
> +     .name = "omapdrm_",
> +     .id = 0,
> +};
> +#endif
> +
>  static int __init omap_dss_init(void)
>  {
>       int r;
> @@ -300,6 +311,12 @@ static int __init omap_dss_init(void)
>                       goto err_reg;
>       }
>  
> +#if IS_ENABLED(CONFIG_DRM_OMAP)
> +     r = platform_device_register(&omap_drm_device);
> +     if (r)
> +             goto err_reg;
> +#endif

Where is the unregister?

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20161214/2bfe32ba/attachment.sig>

Reply via email to