On Tue, Jul 15, 2025 at 7:30 AM Thomas Zimmermann <tzimmerm...@suse.de> wrote: > > Include <linux/of.h> to declare struct device_node and include > <linux/mod_devicetable.h> to declare struct of_device_id. Avoids > dependency on backlight header to include it.
struct device_node should be opaque... /* * If there is a phandle pointing to the device node we can * assume that another device will manage the status changes. * If not we make sure the backlight is in a consistent state. */ if (!dev->of_node->phandle) backlight_update_status(bd); Well, that is ugly. IMO, we should just drop the check. A DT built with "-@" option will have phandle set, so that's not a reliable test. Rob