[PATCH v7 1/3] backlight: Add IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)

Jani Nikula jani.nikula at linux.intel.com
Mon Oct 2 08:49:20 UTC 2017


On Mon, 02 Oct 2017, Daniel Thompson <daniel.thompson at linaro.org> wrote:
> On 01/10/17 18:26, Meghana Madhyastha wrote:
>> -#ifdef CONFIG_OF
>> +#if defined CONFIG_OF && IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>
> The above comments are more important but why does this mix defined and 
> IS_ENABLED? Couldn't they both use defined (and preferably with the 
> optional brackets around the CONFIG_ symbol).

No, always use IS_ENABLED() for tristates when you want to match 'y' or
'm'.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dri-devel mailing list