From: Pavel Machek <pavel@ucw.cz>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>, Dan Murphy <dmurphy@ti.com>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
Date: Mon, 15 Feb 2021 10:49:00 +0100 [thread overview]
Message-ID: <20210215094900.GA27528@amd> (raw)
In-Reply-To: <CACRpkdYpHAN5XYLxRj4Rktzj+LbGRFYwtUU72gqUwE=AEt0j6g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
Hi!
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The leds-rt8515 driver can optionall use the v4l2 flash led class,
> > but it causes a link error when that class is in a loadable module
> > and the rt8515 driver itself is built-in:
> >
> > ld.lld: error: undefined symbol: v4l2_flash_init
> > >>> referenced by leds-rt8515.c
> > >>> leds/flash/leds-rt8515.o:(rt8515_probe) in archive
> > drivers/built-in.a
> >
> > Adding 'depends on V4L2_FLASH_LED_CLASS' in Kconfig would avoid that,
> > but it would make it impossible to use the driver without the
> > v4l2 support.
> >
> > Add the same dependency that the other users of this class have
> > instead, which just prevents the broken configuration.
> >
> > Fixes: e1c6edcbea13 ("leds: rt8515: Add Richtek RT8515 LED driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> > + depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
>
> This kind of thing that looks like a truism but isn't is one of the
> most unintuitive
> things about KConfig :/ no idea what to do about it though.
This is the way it is usually fixed. Anyway, I applied it and pushed
it to Linus and it is now merged.
> I remember making a program for the C64 in early 1990ies with joke input
> such as y/n/m (yes/no/maybe), sadly in Kconfig this is no joke.
:-).
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2021-02-15 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 15:39 [PATCH] leds: rt8515: add V4L2_FLASH_LED_CLASS dependency Arnd Bergmann
2021-02-04 16:12 ` Pavel Machek
2021-02-05 9:16 ` Linus Walleij
2021-02-15 9:49 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210215094900.GA27528@amd \
--to=pavel@ucw.cz \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=dmurphy@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox