Re: [PATCH 1/2] media: add SECO cec driver

From: Hans Verkuil
Date: Thu Oct 04 2018 - 17:40:12 EST


On 10/04/2018 11:31 PM, ektor5 wrote:
> Hi Hans,
>
>>>> +static int secocec_cec_get_notifier(struct cec_notifier **notify)
>>
>> If you compare this driver with cros-ec-cec.c, then you'll see that
>> there this function is under "#if IS_ENABLED(CONFIG_PCI) && IS_ENABLED(CONFIG_DMI)".
>>
>> I think you should do the same and (just like cros-ec-cec.c) add a dummy function
>> in the #else part.
>
> I'm not sure about this. Doing so, compiling without CONFIG_PCI or
> CONFIG_DMI, it will fail later when no notifier is found (now it will
> probably fail at compile time). Should I select them in the Kconfig or
> it is better to eventually disable the notifier and go on adding
> CEC_CAP_PHYS_ADDR to device capabilities?

After thinking about this some more, you can just add:

depends on PCI && DMI

in the Kconfig.

Much easier, really.

Regards,

Hans