Re: [v4l-dvb-maintainer] [2.6 patch] fix CONFIG_TUNER_TEA5761=m

From: Trent Piepho
Date: Mon Oct 22 2007 - 16:31:47 EST


On Mon, 22 Oct 2007, Michael Krufky wrote:
> Trent Piepho wrote:
> >>> +++ b/drivers/media/video/tuner-core.c
> >>> @@ -30,9 +30,7 @@
> >>>
> >>> /* standard i2c insmod options */
> >>> static unsigned short normal_i2c[] = {
> >>> -#ifdef CONFIG_TUNER_TEA5761
> >>> 0x10,
> >>> -#endif
> >>>
> >>>
> >> ^^^ I believe that we want to keep these #ifdef's above... The removals
> >> below are fine.
> >>
> >
> > Won't leaving in the call to tea5761_autodetection() when tea5761 is not
> > compiled in result in an undefined symbol error?
> >
> It shouldn't -- See tea5761.h ... If the module is not selected, then a
> stub will report that the driver was disabled by Kconfig.

You're right, there's no need to have the tuner-core code remove the tea5761
function calls as the stubs will take care of it.

We could delete the #if/#endif around the 0x10 address to scan, or keep it.
What's better, to not scan the address if it's not needed, or to scan it and
then produce an error message if something is found there?

But if it stays, it should look like this:

> > #if defined(CONFIG_TUNER_TEA5761) || (defined(CONFIG_TUNER_TEA5761_MODULE) && defined(MODULE))

i.e., only scan 0x10 if there is callable tea5761 code to handle it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/