[PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>

Rob Herring robh at kernel.org
Tue Jul 15 06:34:32 PDT 2025


On Tue, Jul 15, 2025 at 7:30 AM Thomas Zimmermann <tzimmermann at 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



More information about the linux-arm-kernel mailing list