Re: [PATCH v2 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi


Am 12.12.24 um 22:04 schrieb Arnd Bergmann:
On Thu, Dec 12, 2024, at 19:44, Helge Deller wrote:
On 12/12/24 11:04, Thomas Zimmermann wrote:
Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter
only controls backlight support within fbdev core code and data
structures.

Make fbdev drivers depend on BACKLIGHT_CLASS_DEVICE and let users
select it explicitly. Fixes warnings about recursive dependencies,
such as [...]
I think in the fbdev drivers themselves you should do:
	select BACKLIGHT_CLASS_DEVICE
instead of "depending" on it.
This is the way as it's done in the DRM tiny and the i915/gma500 DRM drivers.

So, something like:

--- a/drivers/staging/fbtft/Kconfig
         tristate "Support for small TFT LCD display modules"
         depends on FB && SPI
         depends on FB_DEVICE
    +    select BACKLIGHT_DEVICE_CLASS
         depends on GPIOLIB || COMPILE_TEST
         select FB_BACKLIGHT

config FB_BACKLIGHT
            tristate
            depends on FB
    -	  select BACKLIGHT_CLASS_DEVICE
    +       depends on BACKLIGHT_CLASS_DEVICE


Would that fix the dependency warning?
The above is generally a mistake and the root cause of the
dependency loops. With very few exceptions, the solution in
these cases is to find the inconsistent 'select' and change
it into 'depends on'.

I actually have a few more patches like this that I've
been carrying for years now, e.g. one that changes all the
'select I2C' into appropriate dependencies.

Thanks! If you have something for DRM, please submit. In the case of i2c, it might happen that the driver is useful without i2c support. But that's a discussion for the individual reviews.

Best regards
Thomas


        Arnd

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux