linux/drivers/media/common
Ingo Molnar 6637dea60e V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error
-tip testing found the following build failure:

  LD      .tmp_vmlinux1
  drivers/built-in.o: In function `generic_set_freq':
  tuner-xc2028.c:(.text+0xbd896): undefined reference to `request_firmware'
  tuner-xc2028.c:(.text+0xbdd7a): undefined reference to `release_firmware'
  drivers/built-in.o: In function `xc_load_fw_and_init_tuner':
  xc5000.c:(.text+0xc68e6): undefined reference to `request_firmware'
  xc5000.c:(.text+0xc6abe): undefined reference to `release_firmware'

with this config:

  http://redhat.com/~mingo/misc/config-Tue_May_20_18_11_34_CEST_2008.bad

the reason is another kconfig tool bug that has to be worked around in
the driver's Kconfig file: if FW_LOADER is selected in a second
dependency, that is not properly propagated up the dependencies.

in this case, FW_LOADER is selected from MEDIA_TUNER_XC2028:

  config MEDIA_TUNER_XC2028
        tristate "XCeive xc2028/xc3028 tuners"
        depends on VIDEO_MEDIA && I2C
        depends on HOTPLUG
        select FW_LOADER

which got selected by MEDIA_TUNER:

  config MEDIA_TUNER
        tristate
        default VIDEO_MEDIA && I2C
        depends on VIDEO_MEDIA && I2C
        select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG

but the kconfig tool did not pick up this second-order dependency and
allowed CONFIG_FW_LOADER=m to be selected - in which case the build
fails.

the workaround i found was to move the select of FW_LOADER one level up,
so that the buggy kconfig tool can notice it and can act appropriately.
This problem can probably be worked around in other ways as well, i went
for the minimal fix.

Obviously, the kconfig tool should be fixed, it is not reasonable to
expect driver authors to do manual dependency resolution (that kconfig
itself already does) and uglify the Kconfig files. The kconfig tool did
nothing to warn about this situation and did not prevent this faulty
.config from being constructed.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-05 06:35:53 -03:00
..
tuners V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error 2008-06-05 06:35:53 -03:00
Kconfig V4L/DVB (7133): Fix Kconfig dependencies 2008-02-18 11:14:53 -03:00
Makefile fix drivers/media/common/tuners/ build bug 2008-04-30 08:36:04 -07:00
ir-functions.c V4L/DVB (7094): static memory 2008-04-24 13:42:20 -03:00
ir-keymaps.c V4L/DVB (7677): saa7134: Add/fix Beholder entries 2008-04-24 14:09:46 -03:00
saa7146_core.c V4L/DVB (7508): media/common/ replace remaining __FUNCTION__ occurrences 2008-04-24 14:07:58 -03:00
saa7146_fops.c NULL noise: drivers/media 2008-03-30 14:18:41 -07:00
saa7146_hlp.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
saa7146_i2c.c V4L/DVB (7508): media/common/ replace remaining __FUNCTION__ occurrences 2008-04-24 14:07:58 -03:00
saa7146_vbi.c V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API 2008-04-24 14:07:44 -03:00
saa7146_video.c V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API 2008-04-24 14:07:44 -03:00