diff mbox

[4/5] drm/imx: ipuv3 plane: Use the helper ipu_plane_cleanup() in ipu_plane_destroy()

Message ID 1448007251-25591-4-git-send-email-Ying.Liu@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liu Ying Nov. 20, 2015, 8:14 a.m. UTC
To reduce code duplication, we can use the helper ipu_plane_cleanup() in
ipu_plane_destroy().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git.

 drivers/gpu/drm/imx/ipuv3-plane.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Philipp Zabel Nov. 23, 2015, 11:48 a.m. UTC | #1
Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying:
> To reduce code duplication, we can use the helper ipu_plane_cleanup() in
> ipu_plane_destroy().
> 
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> ---
> This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git.
> 
>  drivers/gpu/drm/imx/ipuv3-plane.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
> index e60b382..b3ed207 100644
> --- a/drivers/gpu/drm/imx/ipuv3-plane.c
> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
> @@ -369,8 +369,7 @@ static void ipu_plane_destroy(struct drm_plane *plane)
>  	DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
>  
>  	ipu_disable_plane(plane);
> -	drm_plane_cleanup(plane);
> -	kfree(ipu_plane);
> +	ipu_plane_cleanup(ipu_plane);
>  }
>  
>  static struct drm_plane_funcs ipu_plane_funcs = {

This could be merged into the first patch, but I don't think
ipu_plane_cleanup is necessary at all.

regards
Philipp
Liu Ying Nov. 24, 2015, 5:29 a.m. UTC | #2
On Mon, Nov 23, 2015 at 12:48:12PM +0100, Philipp Zabel wrote:
> Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying:
> > To reduce code duplication, we can use the helper ipu_plane_cleanup() in
> > ipu_plane_destroy().
> > 
> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> > ---
> > This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git.
> > 
> >  drivers/gpu/drm/imx/ipuv3-plane.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
> > index e60b382..b3ed207 100644
> > --- a/drivers/gpu/drm/imx/ipuv3-plane.c
> > +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
> > @@ -369,8 +369,7 @@ static void ipu_plane_destroy(struct drm_plane *plane)
> >  	DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
> >  
> >  	ipu_disable_plane(plane);
> > -	drm_plane_cleanup(plane);
> > -	kfree(ipu_plane);
> > +	ipu_plane_cleanup(ipu_plane);
> >  }
> >  
> >  static struct drm_plane_funcs ipu_plane_funcs = {
> 
> This could be merged into the first patch, but I don't think
> ipu_plane_cleanup is necessary at all.

IMHO, it doesn't hurt to split it up as two patches :)

Regards,
Liu Ying

> 
> regards
> Philipp
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index e60b382..b3ed207 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -369,8 +369,7 @@  static void ipu_plane_destroy(struct drm_plane *plane)
 	DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
 
 	ipu_disable_plane(plane);
-	drm_plane_cleanup(plane);
-	kfree(ipu_plane);
+	ipu_plane_cleanup(ipu_plane);
 }
 
 static struct drm_plane_funcs ipu_plane_funcs = {