For bridge hotplug drmm allocations are not suitable because a connector
may have to be added and removed multiple times in the lifetime of a card.

In preparation to support hotpluggable HDMI bridges (and the
drm_bridge_connector) we need a non-drmm variant of the CEC notifier
(de)registration API, with an explicit unregister API.

To differentiate the new explicit unregister API from the existing drmm
cleanup action, use the drmm_ prefix for the latter.

Signed-off-by: Luca Ceresoli <[email protected]>

---

New patch in v3.
---
 drivers/gpu/drm/display/drm_hdmi_cec_notifier_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/display/drm_hdmi_cec_notifier_helper.c 
b/drivers/gpu/drm/display/drm_hdmi_cec_notifier_helper.c
index 31b8e4a93e24..47662bdc5d08 100644
--- a/drivers/gpu/drm/display/drm_hdmi_cec_notifier_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_cec_notifier_helper.c
@@ -25,7 +25,7 @@ static void 
drm_connector_hdmi_cec_notifier_phys_addr_set(struct drm_connector *
        cec_notifier_set_phys_addr(connector->cec.data, addr);
 }
 
-static void drm_connector_hdmi_cec_notifier_unregister(struct drm_device *dev, 
void *res)
+static void drmm_connector_hdmi_cec_notifier_unregister(struct drm_device 
*dev, void *res)
 {
        struct drm_connector *connector = res;
 
@@ -59,7 +59,7 @@ int drmm_connector_hdmi_cec_notifier_register(struct 
drm_connector *connector,
        mutex_unlock(&connector->cec.mutex);
 
        return drmm_add_action_or_reset(connector->dev,
-                                       
drm_connector_hdmi_cec_notifier_unregister,
+                                       
drmm_connector_hdmi_cec_notifier_unregister,
                                        connector);
 }
 EXPORT_SYMBOL(drmm_connector_hdmi_cec_notifier_register);

-- 
2.56.1

Reply via email to