From: Laurent Pinchart Date: Wed, 20 Apr 2016 22:21:14 +0000 (+0300) Subject: drm: Remove warning from drm_connector_unregister_all() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=14ba00316543bb67c81202fd475b605bfa410967;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm: Remove warning from drm_connector_unregister_all() Commit 6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()") replaced a manual connectors list walk in drm_connector_unregister_all() with drm_for_each_connector(). The list was walked without the mode config mutex locked as that ends up in a clash with sysfs, but drm_connector_unregister_all() warns when the mutex isn't locked. The problem is known and doesn't require a large warning every time drm_connector_unregister_all() is called. Fix it by reverting to manual list walk. Fixes: 6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()") Signed-off-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1461190874-32674-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index ee549a30bff1..edcf12c5521d 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1122,7 +1122,7 @@ void drm_connector_unregister_all(struct drm_device *dev) struct drm_connector *connector; /* FIXME: taking the mode config mutex ends up in a clash with sysfs */ - drm_for_each_connector(connector, dev) + list_for_each_entry(connector, &dev->mode_config.connector_list, head) drm_connector_unregister(connector); } EXPORT_SYMBOL(drm_connector_unregister_all);