From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
rvinyard@cs.nmsu.edu
Subject: Re: [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE
Date: Tue, 6 Apr 2010 09:56:33 -0700 [thread overview]
Message-ID: <20100406095633.49ec957a.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20100406183535.7de3c628@neptune.home>
On Tue, 6 Apr 2010 18:35:35 +0200 Bruno Prémont wrote:
> On Tue, 06 April 2010 Randy Dunlap <randy.dunlap@oracle.com> wrote:
> > On Tue, 6 Apr 2010 10:56:35 +0200 Bruno Prémont wrote:
> >
> > > On Tue, 6 Apr 2010 10:40:06 +0200 Jiri Kosina <jkosina@suse.cz> wrote:
> > > >
> > > > [ adding Bruno to CC ]
> > > >
> > > > On Mon, 5 Apr 2010, Randy Dunlap wrote:
> > > >
> > > > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > > >
> > > > > HID_PICOLCD should depend on LCD_CLASS_DEVICE, otherwise the
> > > > > build fails when HID_PICOLCD=y and LCD_CLASS_DEVICE=m:
> > > > >
> > > > > hid-picolcd.c:(.text+0x84523f): undefined reference to `lcd_device_unregister'
> > > > > hid-picolcd.c:(.text+0x8478ab): undefined reference to `lcd_device_register'
> > > > > hid-picolcd.c:(.text+0x84c15f): undefined reference to `lcd_device_unregister'
> > >
> > > That is weird, the
> > >
> > > #if defined(CONFIG_LCD_CLASS_DEVICE) || defined(CONFIG_LCD_CLASS_DEVICE_MODULE)
> > > feature support code
> > > #else
> > > empty stubs
> > > #endif
> > >
> > > blocks should have prevented LCD_CLASS support from being built if it
> > > was not enabled in configuration.
> > >
> > > Do you have the .config matching your build?
> >
> > Yes, it's attached.
>
> Thanks, here is the extract (only the pertinent items):
> CONFIG_BACKLIGHT_LCD_SUPPORT=y
> CONFIG_LCD_CLASS_DEVICE=m
> CONFIG_BACKLIGHT_CLASS_DEVICE=y
> CONFIG_HID_PICOLCD=y
>
> It triggers the issue by having PicoLCD built-in while one of the
> optional dependencies as a module.
Yes, basically what the patch description said.
> Any idea of how this can be solved with kbuild in order to keep the
> dependencies optional?
>
> Something that would satisfy the following pseudocode:
> if CONFIG_HID_PICOLCD == y
> assert(CONFIG_LCD_CLASS_DEVICE != m)
>
If you don't want the kconfig machinery to do that (it appears that you don't),
then I guess that you'll need to expand the source code to handle
CONFIG_LCD_CLASS_DEVICE=y and CONFIG_LCD_CLASS_DEVICE=m differently.
Or only handle them differently if HID_PICOLCD=y. :(
>
> One of my attempts did end up with a circular loop with regard to FB
> (some of the FB drivers did select INPUT)?
(not that I can find)
CONFIG_VT does select INPUT
and CONFIG_DRM_I915 does
select INPUT if ACPI
> I had something like:
>
> config HID_PICOLCD
> tristate ...
>
> config HID_PICOLCD_FB
> bool ...
> depends on HID_PICOLCD
> select FB
> select FB_...
>
> ...
>
> Then in the code I checked for CONFIG_HID_PICOLCD_FB instead of
> (CONFIG_FB or CONFIG_FB_MODULE).
---
~Randy
(re)read Documentation/ManagementStyle
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
rvinyard@cs.nmsu.edu
Subject: Re: [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE
Date: Tue, 6 Apr 2010 09:56:33 -0700 [thread overview]
Message-ID: <20100406095633.49ec957a.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20100406183535.7de3c628@neptune.home>
On Tue, 6 Apr 2010 18:35:35 +0200 Bruno Prémont wrote:
> On Tue, 06 April 2010 Randy Dunlap <randy.dunlap@oracle.com> wrote:
> > On Tue, 6 Apr 2010 10:56:35 +0200 Bruno Prémont wrote:
> >
> > > On Tue, 6 Apr 2010 10:40:06 +0200 Jiri Kosina <jkosina@suse.cz> wrote:
> > > >
> > > > [ adding Bruno to CC ]
> > > >
> > > > On Mon, 5 Apr 2010, Randy Dunlap wrote:
> > > >
> > > > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > > >
> > > > > HID_PICOLCD should depend on LCD_CLASS_DEVICE, otherwise the
> > > > > build fails when HID_PICOLCD=y and LCD_CLASS_DEVICE=m:
> > > > >
> > > > > hid-picolcd.c:(.text+0x84523f): undefined reference to `lcd_device_unregister'
> > > > > hid-picolcd.c:(.text+0x8478ab): undefined reference to `lcd_device_register'
> > > > > hid-picolcd.c:(.text+0x84c15f): undefined reference to `lcd_device_unregister'
> > >
> > > That is weird, the
> > >
> > > #if defined(CONFIG_LCD_CLASS_DEVICE) || defined(CONFIG_LCD_CLASS_DEVICE_MODULE)
> > > feature support code
> > > #else
> > > empty stubs
> > > #endif
> > >
> > > blocks should have prevented LCD_CLASS support from being built if it
> > > was not enabled in configuration.
> > >
> > > Do you have the .config matching your build?
> >
> > Yes, it's attached.
>
> Thanks, here is the extract (only the pertinent items):
> CONFIG_BACKLIGHT_LCD_SUPPORT=y
> CONFIG_LCD_CLASS_DEVICE=m
> CONFIG_BACKLIGHT_CLASS_DEVICE=y
> CONFIG_HID_PICOLCD=y
>
> It triggers the issue by having PicoLCD built-in while one of the
> optional dependencies as a module.
Yes, basically what the patch description said.
> Any idea of how this can be solved with kbuild in order to keep the
> dependencies optional?
>
> Something that would satisfy the following pseudocode:
> if CONFIG_HID_PICOLCD == y
> assert(CONFIG_LCD_CLASS_DEVICE != m)
>
If you don't want the kconfig machinery to do that (it appears that you don't),
then I guess that you'll need to expand the source code to handle
CONFIG_LCD_CLASS_DEVICE=y and CONFIG_LCD_CLASS_DEVICE=m differently.
Or only handle them differently if HID_PICOLCD=y. :(
>
> One of my attempts did end up with a circular loop with regard to FB
> (some of the FB drivers did select INPUT)?
(not that I can find)
CONFIG_VT does select INPUT
and CONFIG_DRM_I915 does
select INPUT if ACPI
> I had something like:
>
> config HID_PICOLCD
> tristate ...
>
> config HID_PICOLCD_FB
> bool ...
> depends on HID_PICOLCD
> select FB
> select FB_...
>
> ...
>
> Then in the code I checked for CONFIG_HID_PICOLCD_FB instead of
> (CONFIG_FB or CONFIG_FB_MODULE).
---
~Randy
(re)read Documentation/ManagementStyle
next prev parent reply other threads:[~2010-04-06 16:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 23:09 mmotm 2010-04-05-16-09 uploaded akpm
2010-04-06 5:04 ` [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE Randy Dunlap
2010-04-06 8:40 ` Jiri Kosina
2010-04-06 8:56 ` Bruno Prémont
2010-04-06 15:26 ` Randy Dunlap
2010-04-06 16:35 ` Bruno Prémont
2010-04-06 16:35 ` Bruno Prémont
2010-04-06 16:56 ` Randy Dunlap [this message]
2010-04-06 16:56 ` Randy Dunlap
2010-04-06 21:04 ` Bruno Prémont
2010-04-06 21:04 ` Bruno Prémont
2010-04-07 16:20 ` Randy Dunlap
2010-04-07 18:31 ` Bruno Prémont
2010-04-07 18:31 ` Bruno Prémont
2010-04-08 12:42 ` Jiri Kosina
2010-04-08 12:42 ` Jiri Kosina
2010-04-11 10:17 ` Bruno Prémont
2010-04-11 10:17 ` Bruno Prémont
2010-04-11 18:28 ` Jiri Kosina
2010-04-11 18:28 ` Jiri Kosina
2010-04-07 18:44 ` Bruno Prémont
2010-04-07 20:12 ` Randy Dunlap
2010-04-07 20:12 ` Randy Dunlap
2010-04-07 20:29 ` Bruno Prémont
2010-04-07 20:29 ` Bruno Prémont
2010-04-07 18:01 ` mmotm 2010-04-05-16-09 uploaded Valdis.Kletnieks
2010-04-08 11:41 ` Patrick McHardy
2010-04-08 15:23 ` Valdis.Kletnieks
2010-04-08 15:36 ` Patrick McHardy
2010-04-09 0:50 ` Valdis.Kletnieks
2010-04-09 14:49 ` Patrick McHardy
2010-04-08 23:57 ` mmotm 2010-04-05 - another RCU whinge (not network this time) Valdis.Kletnieks
2010-04-09 23:16 ` Paul E. McKenney
2010-04-10 3:22 ` Valdis.Kletnieks
2010-04-10 5:15 ` Paul E. McKenney
2010-04-12 18:32 ` Oleg Nesterov
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=20100406095633.49ec957a.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=bonbons@linux-vserver.org \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rvinyard@cs.nmsu.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.