]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panel: rm68200: Add backlight dependency
authorArnd Bergmann <arnd@arndb.de>
Tue, 13 Mar 2018 20:59:54 +0000 (21:59 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 14 Mar 2018 10:51:24 +0000 (11:51 +0100)
commit1191d3c205c5eac8b67c167e80af1a8980bd9cd8
tree4e292ccc73a8437cf71e933efd25f94c04bba1d4
parentc0843dee3283637aa64f25da61b9c37e6010e1ba
drm/panel: rm68200: Add backlight dependency

Like many other panel drivers, this one fails to build when backlight
support is disabled:

drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe':
panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight'

This adds the appropriate dependency.

Note that while include/linux/backlight.h provides a stub inline when
backlight support is not enabled, this isn't enough to deal with the
case where backlight support is built as a module but the panel driver
is built-in, in which case linking will still fail as above.

One way to avoid this is to add a dependency such as this:

        depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

but that is rather complex and misses the point that the panel support
is mostly useless without backlight support.

Fixes: 1bca01527100 ("drm/panel: Add support for Raydium RM68200 panel driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[treding@nvidia.com: clarify the need for the dependency]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180313210015.3344380-1-arnd@arndb.de
drivers/gpu/drm/panel/Kconfig