[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yo2jhTpsa5Vw4+61@google.com>
Date: Wed, 25 May 2022 11:33:25 +0800
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Matthias Kaehlcke <mka@...omium.org>
Cc: bleung@...omium.org, groeck@...omium.org, robh+dt@...nel.org,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>
Subject: Re: [PATCH v4 4/5] platform/chrome: cros_kbd_led_backlight: support
OF match
On Tue, May 24, 2022 at 01:08:00PM -0700, Matthias Kaehlcke wrote:
> On Mon, May 23, 2022 at 05:08:21PM +0800, Tzung-Bi Shih wrote:
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id keyboard_led_of_match[] = {
> > + {
> > + .compatible = "google,cros-kbd-led-backlight",
> > + },
> > + {}
> > +};
> > +MODULE_DEVICE_TABLE(of, keyboard_led_of_match);
> > +#endif
> > +
> > static struct platform_driver keyboard_led_driver = {
> > .driver = {
> > .name = "chromeos-keyboard-leds",
> > .acpi_match_table = ACPI_PTR(keyboard_led_acpi_match),
> > + .of_match_table = of_match_ptr(keyboard_led_of_match),
>
> You need to put this assignment inside an '#ifdef CONFIG_OF' block,
> otherwise the compiler won't find 'keyboard_led_of_match' when
> CONFIG_OF isn't set.
It doesn't need as of_match_ptr() already guarded it.
Powered by blists - more mailing lists