Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros
From: Enrico Weigelt, metux IT consult
Date: Fri Nov 27 2020 - 07:46:01 EST
On 18.11.20 11:01, Andy Shevchenko wrote:
>>> So a system without CONFIG_OF might still make use of .of_match_table?
>>
>> Yep!
>
> If you are curious:
> https://elixir.bootlin.com/linux/latest/source/drivers/acpi/bus.c#L615
Phuh, this changes everything ... sorry, didn't know that.
If ACPI now can contain OF pieces, we should ask the question whether
of_match_ptr() should be used at all.
Would it be a compromise introducing a new macro (eg. "OF_MATCH_PTR()")
which passes through the pointer if either OF or ACPI is enabled.
Maybe we could introduce a new config item (eg "OF_MATCH_TABLE") for
that, which is enabled by both OF and ACPI. And maybe add an option for
of-compatible checking in ACPI.
How do you folks think about that ?
--mtx
--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@xxxxxxxxx -- +49-151-27565287