OSDN Git Service

drm/drm_panel: no error when no callback
authorSam Ravnborg <sam@ravnborg.org>
Sat, 7 Dec 2019 14:03:29 +0000 (15:03 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 9 Dec 2019 21:57:26 +0000 (22:57 +0100)
commit5dce87a91970bf7c7ef3de5e2bff08b695d858a3
treefabf03a65d13058b7525a12f80be8771d2d171db
parent4286dc07e6ae56ed33e9067850d6c04ff062195f
drm/drm_panel: no error when no callback

The callbacks in drm_panel_funcs are optional, so do not
return an error just because no callback is assigned.

v2:
- Document what functions in drm_panel_funcs are optional (Laurent)
- Return -EOPNOTSUPP if get_modes() is not assigned (Laurent)
  (Sam: -EOPNOTSUPP seems to best error code in this situation)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-2-sam@ravnborg.org
drivers/gpu/drm/drm_panel.c
include/drm/drm_panel.h