drm/bridge: Drop drm_connector_unregister and call drm_connector_cleanup directly
Subsystems (3)
PATCH 1/1 drm/bridge: Drop drm_connector_unregister and call drm_connector_cleanup directly
Drop unneeded drm_connector_unregister() and remove the unnecessary wrapper functions around drm_connector_cleanup().
Signed-off-by Marek Vasut <[email protected]>
Cc Daniel Vetter <[email protected]>
--- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +-------- drivers/gpu/drm/bridge/dw-hdmi.c | 8 +------- drivers/gpu/drm/bridge/tc358767.c | 8 +------- 3 files changed, 3 insertions(+), 22 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1 -8
@@ -999,18 +999,11 @@ analogix_dp_detect(struct drm_connector *connector, bool force)return status; } -static void analogix_dp_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); - -} -static const struct drm_connector_funcs analogix_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = analogix_dp_detect, - .destroy = analogix_dp_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,
drivers/gpu/drm/bridge/dw-hdmi.c +1 -7
@@ -1477,12 +1477,6 @@ dw_hdmi_connector_mode_valid(struct drm_connector *connector,return mode_status; } -static void dw_hdmi_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static void dw_hdmi_connector_force (struct drm_connector *connector) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
@@ -1499,7 +1493,7 @@ static const struct drm_connector_funcs dw_hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, - .destroy = dw_hdmi_connector_destroy, + .destroy = drm_connector_cleanup, .force = dw_hdmi_connector_force, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
drivers/gpu/drm/bridge/tc358767.c +1 -7
@@ -1165,17 +1165,11 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { .best_encoder = tc_connector_best_encoder, }; -static void tc_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static const struct drm_connector_funcs tc_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = tc_connector_detect, - .destroy = tc_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,
Signature · 6 lines
2.9.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Marek Vasut
Drop unneeded
drm_connector_unregister()and remove the unnecessary wrapper functions arounddrm_connector_cleanup().Signed-off-by Marek Vasut <[email protected]>Cc Daniel Vetter <[email protected]>
Yeah, since 4.8 the only connectors you need to register/unregister explicitly are hotpluggeable ones like DP mst. Applied to drm-misc, thanks for this neat little cleanup.
-Daniel
Quoted 82 lines
--- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +-------- drivers/gpu/drm/bridge/dw-hdmi.c | 8 +------- drivers/gpu/drm/bridge/tc358767.c | 8 +------- 3 files changed, 3 insertions(+), 22 deletions(-)drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1
-8@@ -999,18 +999,11 @@ analogix_dp_detect(struct drm_connector *connector, bool force)return status; } -static void analogix_dp_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); - -} -static const struct drm_connector_funcs analogix_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = analogix_dp_detect, - .destroy = analogix_dp_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,drivers/gpu/drm/bridge/dw-hdmi.c +1
-7@@ -1477,12 +1477,6 @@ dw_hdmi_connector_mode_valid(struct drm_connector *connector,return mode_status; } -static void dw_hdmi_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static void dw_hdmi_connector_force (struct drm_connector *connector) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,@@ -1499,7 +1493,7 @@ static const struct drm_connector_funcs dw_hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, - .destroy = dw_hdmi_connector_destroy, + .destroy = drm_connector_cleanup, .force = dw_hdmi_connector_force, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,drivers/gpu/drm/bridge/tc358767.c +1
-7@@ -1165,17 +1165,11 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { .best_encoder = tc_connector_best_encoder, }; -static void tc_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static const struct drm_connector_funcs tc_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = tc_connector_detect, - .destroy = tc_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,Signature · 1 line
2.9.3
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel