mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Laurent Pinchart <laurent.pinchart@skynet.be>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [build bug] uvc_status_cleanup(): undefined reference to `input_unregister_device'
Date: Wed, 11 Feb 2009 06:29:33 -0200	[thread overview]
Message-ID: <20090211062933.3c9cd5a5@pedra.chehab.org> (raw)
In-Reply-To: <200902100144.22532.laurent.pinchart@skynet.be>


On Tue, 10 Feb 2009 01:44:22 +0100
Laurent Pinchart <laurent.pinchart@skynet.be> wrote:

> Hi Ingo,
> 
> On Sunday 08 February 2009 15:58:35 Ingo Molnar wrote:
> > Hi, havent seen this reported on lkml yet.
> >
> > -tip testing found that certain (user-reachable) Kconfig combinations
> > can cause this build failure on latest mainline:
> >
> >  drivers/built-in.o: In function `uvc_status_cleanup':
> >  (.text+0x221cca): undefined reference to `input_unregister_device'
> >  drivers/built-in.o: In function `uvc_status_init':
> >  (.text+0x221d4c): undefined reference to `input_allocate_device'
> >  drivers/built-in.o: In function `uvc_status_init':
> >  (.text+0x221db3): undefined reference to `input_free_device'
> >  drivers/built-in.o: In function `uvc_status_init':
> >  (.text+0x221ec6): undefined reference to `input_register_device'
> >  drivers/built-in.o: In function `uvc_status_complete':
> >  uvc_status.c:(.text+0x2222ec): undefined reference to `input_event'
> >
> > triggered on v2.6.29-rc3-697-gae1a25d. The problem is this combination:
> >
> >  CONFIG_INPUT=m
> >  CONFIG_USB_VIDEO_CLASS=y
> >  CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
> 
> Thanks for the report. The following patch should fix the issue.
> 
> diff --git a/drivers/media/video/uvc/Kconfig b/drivers/media/video/uvc/Kconfig
> index c2d9760..0dbe7b9 100644
> --- a/drivers/media/video/uvc/Kconfig
> +++ b/drivers/media/video/uvc/Kconfig
> @@ -9,7 +9,7 @@ config USB_VIDEO_CLASS
>  config USB_VIDEO_CLASS_INPUT_EVDEV
>         bool "UVC input events device support"
>         default y
> -       depends on USB_VIDEO_CLASS && INPUT
> +       depends on USB_VIDEO_CLASS && (INPUT = y || INPUT = USB_VIDEO_CLASS)
>         ---help---
>           This option makes USB Video Class devices register an input device
>           to report button events.
> 
> I'm not completely satisfied with this though, as the 
> USB_VIDEO_CLASS_INPUT_EVDEV completely disappears from the configuration menu 
> if INPUT is set to 'm' and USB_VIDEO_CLASS to 'y'. Being no Kconfig guru, I'd 
> appreciate if someone could help me to find a nicer fix (if that's possible at 
> all).

This doesn't seem to be right. You're just disabling INPUT, if CONFIG_INPUT = m
and USB_VIDEO_CLASS=y. You should, instead, force USB_VIDEO_CLASS to be 'm' or
'n' on such case.

IMO, a better approach would be the one on the patch bellow.

Cheers,
Mauro

Fix input dependencies on uvc driver

As reported by Ingo:
-tip testing found that certain (user-reachable) Kconfig combinations
can cause this build failure on latest mainline:

 drivers/built-in.o: In function `uvc_status_cleanup':
  (.text+0x221cca): undefined reference to `input_unregister_device'
  drivers/built-in.o: In function `uvc_status_init':
  (.text+0x221d4c): undefined reference to `input_allocate_device'
  drivers/built-in.o: In function `uvc_status_init':
  (.text+0x221db3): undefined reference to `input_free_device'
  drivers/built-in.o: In function `uvc_status_init':
  (.text+0x221ec6): undefined reference to `input_register_device'
  drivers/built-in.o: In function `uvc_status_complete':
  uvc_status.c:(.text+0x2222ec): undefined reference to `input_event'

triggered on v2.6.29-rc3-697-gae1a25d. The problem is this combination:

  CONFIG_INPUT=m
  CONFIG_USB_VIDEO_CLASS=y
  CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/video/uvc/Kconfig b/drivers/media/video/uvc/Kconfig
index c2d9760..fab4733 100644
--- a/drivers/media/video/uvc/Kconfig
+++ b/drivers/media/video/uvc/Kconfig
@@ -1,5 +1,6 @@
 config USB_VIDEO_CLASS
 	tristate "USB Video Class (UVC)"
+	depends on !USB_VIDEO_CLASS_INPUT_EVDEV || INPUT
 	---help---
 	  Support for the USB Video Class (UVC).  Currently only video
 	  input devices, such as webcams, are supported.
@@ -9,7 +10,7 @@ config USB_VIDEO_CLASS
 config USB_VIDEO_CLASS_INPUT_EVDEV
 	bool "UVC input events device support"
 	default y
-	depends on USB_VIDEO_CLASS && INPUT
+	depends on INPUT
 	---help---
 	  This option makes USB Video Class devices register an input device
 	  to report button events.


  reply	other threads:[~2009-02-11  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 14:58 Ingo Molnar
2009-02-10  0:44 ` Laurent Pinchart
2009-02-11  8:29   ` Mauro Carvalho Chehab [this message]
2009-02-11 11:47     ` Laurent Pinchart
2009-02-11 12:56       ` Mauro Carvalho Chehab
2009-02-15  0:19         ` Laurent Pinchart
2009-02-15 19:59           ` [PATCH] UVC: " Randy Dunlap
2009-02-16 10:36             ` Laurent Pinchart
2009-02-15 20:00           ` [PATCH PWC: fix build error when CONFIG_INPUT=m Randy Dunlap

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=20090211062933.3c9cd5a5@pedra.chehab.org \
    --to=mchehab@redhat.com \
    --cc=laurent.pinchart@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®