[PATCH v2 3/6] i2c: nomadik: switch from of_device_is_compatible() to of_match_device()
Linus Walleij
linus.walleij at linaro.org
Wed Oct 9 04:21:53 PDT 2024
On Wed, Oct 9, 2024 at 12:23 PM Théo Lebrun <theo.lebrun at bootlin.com> wrote:
> Compatible-specific behavior is implemented using a if-condition on the
> return value from of_device_is_compatible(), from probe. It does not
> scale well when compatible number increases. Switch to using a match
> table and a call to of_match_device().
>
> We DO NOT attach a .of_match_table field to our amba driver, as we do
> not use the table to match our driver to devices.
>
> Sort probe variable declarations in reverse christmas tree to try and
> introduce some logic into the ordering.
>
> Signed-off-by: Théo Lebrun <theo.lebrun at bootlin.com>
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list