Re: [patch net-next 06/11] ACPI: bus: move acpi_match_device_ids() to linux/acpi.h

From: Andy Shevchenko
Date: Fri May 13 2016 - 09:14:12 EST


On Fri, 2016-05-13 at 16:19 +0800, Yisen Zhuang wrote:
> From: Hanjun Guo <hanjun.guo@xxxxxxxxxx>
>
> acpi_match_device_ids() will be used for drivers to match
> different hardware versions, it will be compiled in non-ACPI
> case, but acpi_match_device_ids() in acpi_bus.h and it can
> only be used in ACPI case, so move it to linux/acpi.h and
> introduce a stub function for it.

I somehow doubt this is right move.

Like I said in the previous comment the architectural split might make
this a bit better.

You might useÂ

#ifdef IS_ENABLED(CONFIG_ACPI)
#else
#endif

only once to some big part of code. If kernel is build without ACPI
support you even will not have this in your driver at all.

--Â
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy