Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: drop return code from drm_panel_detach()

There are no errors that can be reported by this function,
so drop the return code.
Fix the only bridge driver that checked the return result.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-14-sam@ravnborg.org

+3 -8
+1 -2
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
··· 1780 1780 if (dp->plat_data->panel) { 1781 1781 if (drm_panel_unprepare(dp->plat_data->panel)) 1782 1782 DRM_ERROR("failed to turnoff the panel\n"); 1783 - if (drm_panel_detach(dp->plat_data->panel)) 1784 - DRM_ERROR("failed to detach the panel\n"); 1783 + drm_panel_detach(dp->plat_data->panel); 1785 1784 } 1786 1785 1787 1786 drm_dp_aux_unregister(&dp->aux);
+1 -5
drivers/gpu/drm/drm_panel.c
··· 123 123 * 124 124 * This function should not be called by the panel device itself. It 125 125 * is only for the drm device that called drm_panel_attach(). 126 - * 127 - * Return: 0 on success or a negative error code on failure. 128 126 */ 129 - int drm_panel_detach(struct drm_panel *panel) 127 + void drm_panel_detach(struct drm_panel *panel) 130 128 { 131 129 panel->connector = NULL; 132 130 panel->drm = NULL; 133 - 134 - return 0; 135 131 } 136 132 EXPORT_SYMBOL(drm_panel_detach); 137 133
+1 -1
include/drm/drm_panel.h
··· 153 153 void drm_panel_remove(struct drm_panel *panel); 154 154 155 155 int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector); 156 - int drm_panel_detach(struct drm_panel *panel); 156 + void drm_panel_detach(struct drm_panel *panel); 157 157 158 158 int drm_panel_prepare(struct drm_panel *panel); 159 159 int drm_panel_unprepare(struct drm_panel *panel);