Message ID | 20161004222331.7200-1-marex@denx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Marek, 2016-10-05 Marek Vasut <marex@denx.de>: > Remove the unnecessary wrapper functions around drm_connector_cleanup(). > > Signed-off-by: Marek Vasut <marex@denx.de> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > --- > drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ > drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ > drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ > 3 files changed, 3 insertions(+), 18 deletions(-) Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Gustavo
On Wed, Oct 05, 2016 at 11:03:20AM +0200, Gustavo Padovan wrote: > Hi Marek, > > 2016-10-05 Marek Vasut <marex@denx.de>: > > > Remove the unnecessary wrapper functions around drm_connector_cleanup(). > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > > --- > > drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ > > drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ > > drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ > > 3 files changed, 3 insertions(+), 18 deletions(-) > > Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Yeah, nice little cleanup. Applied to drm-misc. -Daniel
On 10/05/2016 03:21 PM, Daniel Vetter wrote: > On Wed, Oct 05, 2016 at 11:03:20AM +0200, Gustavo Padovan wrote: >> Hi Marek, >> >> 2016-10-05 Marek Vasut <marex@denx.de>: >> >>> Remove the unnecessary wrapper functions around drm_connector_cleanup(). >>> >>> Signed-off-by: Marek Vasut <marex@denx.de> >>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> >>> --- >>> drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ >>> drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ >>> drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ >>> 3 files changed, 3 insertions(+), 18 deletions(-) >> >> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > Yeah, nice little cleanup. Applied to drm-misc. So while we're at it, I also found drivers with code like [1]. Is calling the drm_connector_unregister() necessary in there at all ? Or shall we convert it the same way as the three drivers above ? [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/bridge/tc358767.c#n1168 > -Daniel >
Hi Marek, 2016-10-05 Marek Vasut <marex@denx.de>: > On 10/05/2016 03:21 PM, Daniel Vetter wrote: > > On Wed, Oct 05, 2016 at 11:03:20AM +0200, Gustavo Padovan wrote: > >> Hi Marek, > >> > >> 2016-10-05 Marek Vasut <marex@denx.de>: > >> > >>> Remove the unnecessary wrapper functions around drm_connector_cleanup(). > >>> > >>> Signed-off-by: Marek Vasut <marex@denx.de> > >>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > >>> --- > >>> drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ > >>> drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ > >>> drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ > >>> 3 files changed, 3 insertions(+), 18 deletions(-) > >> > >> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > > > Yeah, nice little cleanup. Applied to drm-misc. > > So while we're at it, I also found drivers with code like [1]. Is > calling the drm_connector_unregister() necessary in there at all ? > Or shall we convert it the same way as the three drivers above ? drm_connector_register/unregister() are not necessary anymore as this is handled by drm_dev_register() now. So these drivers can be clean up as well. Gustavo
On 10/05/2016 04:20 PM, Gustavo Padovan wrote: > Hi Marek, > > 2016-10-05 Marek Vasut <marex@denx.de>: > >> On 10/05/2016 03:21 PM, Daniel Vetter wrote: >>> On Wed, Oct 05, 2016 at 11:03:20AM +0200, Gustavo Padovan wrote: >>>> Hi Marek, >>>> >>>> 2016-10-05 Marek Vasut <marex@denx.de>: >>>> >>>>> Remove the unnecessary wrapper functions around drm_connector_cleanup(). >>>>> >>>>> Signed-off-by: Marek Vasut <marex@denx.de> >>>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> >>>>> --- >>>>> drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ >>>>> drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ >>>>> drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ >>>>> 3 files changed, 3 insertions(+), 18 deletions(-) >>>> >>>> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> >>> >>> Yeah, nice little cleanup. Applied to drm-misc. >> >> So while we're at it, I also found drivers with code like [1]. Is >> calling the drm_connector_unregister() necessary in there at all ? >> Or shall we convert it the same way as the three drivers above ? > > drm_connector_register/unregister() are not necessary anymore as this is > handled by drm_dev_register() now. So these drivers can be clean up as > well. OK, got it. Patch is out.
diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c index f9f03bc..a2a8236 100644 --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c @@ -1001,16 +1001,11 @@ static enum drm_connector_status anx78xx_detect(struct drm_connector *connector, return connector_status_connected; } -static void anx78xx_connector_destroy(struct drm_connector *connector) -{ - drm_connector_cleanup(connector); -} - static const struct drm_connector_funcs anx78xx_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = anx78xx_detect, - .destroy = anx78xx_connector_destroy, + .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index 93f3dac..f1a9993 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -245,16 +245,11 @@ static enum drm_connector_status ptn3460_detect(struct drm_connector *connector, return connector_status_connected; } -static void ptn3460_connector_destroy(struct drm_connector *connector) -{ - drm_connector_cleanup(connector); -} - static const struct drm_connector_funcs ptn3460_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ptn3460_detect, - .destroy = ptn3460_connector_destroy, + .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index f1b39a2..6f7c2f9 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -483,16 +483,11 @@ static enum drm_connector_status ps8622_detect(struct drm_connector *connector, return connector_status_connected; } -static void ps8622_connector_destroy(struct drm_connector *connector) -{ - drm_connector_cleanup(connector); -} - static const struct drm_connector_funcs ps8622_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ps8622_detect, - .destroy = ps8622_connector_destroy, + .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
Remove the unnecessary wrapper functions around drm_connector_cleanup(). Signed-off-by: Marek Vasut <marex@denx.de> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> --- drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-)