]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: Add devm_drm_bridge_add()
authorDouglas Anderson <dianders@chromium.org>
Tue, 10 May 2022 19:29:43 +0000 (12:29 -0700)
committerDouglas Anderson <dianders@chromium.org>
Thu, 2 Jun 2022 22:15:10 +0000 (15:15 -0700)
commit21ccfdfc00810d0eb423aaec01972dfee39b1808
tree1ccd308cb3fce185348147d0edae477fb3a9add8
parent1a13894a79439d1b7817d8447195770971545b80
drm/bridge: Add devm_drm_bridge_add()

This adds a devm managed version of drm_bridge_add(). Like other
"devm" function listed in drm_bridge.h, this function takes an
explicit "dev" to use for the lifetime management. A few notes:
* In general we have a "struct device" for bridges that makes a good
  candidate for where the lifetime matches exactly what we want.
* The "bridge->dev->dev" device appears to be the encoder
  device. That's not the right device to use for lifetime management.

Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid
drivers/gpu/drm/drm_bridge.c
include/drm/drm_bridge.h