linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	v4l-dvb-maintainer@linuxtv.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.25 regression: VIDEO_DEV=y/m, I2C=n compile error
Date: Mon, 28 Jan 2008 10:40:01 +0200	[thread overview]
Message-ID: <20080128084001.GB1001@does.not.exist> (raw)
In-Reply-To: <20080127223334.696fce6e@gaivota>

On Sun, Jan 27, 2008 at 10:33:34PM -0200, Mauro Carvalho Chehab wrote:
> Hi Adrian and Marcin,
> 
> On Sun, 27 Jan 2008 20:52:16 +0200
> Adrian Bunk <bunk@kernel.org> wrote:
> 
> > Commit 8ffbc6559493c64d6194c92d856196fdaeb8a5fb causes the following 
> > compile error with CONFIG_VIDEO_DEV=y/m, CONFIG_I2C=n:
> > 
> > <--  snip  -->
> > 
> > ...
> >   MODPOST 26 modules
> > ERROR: "i2c_attach_client" [drivers/media/video/v4l2-common.ko] undefined!
> > make[2]: *** [__modpost] Error 1
> > 
> > <--  snip  -->
> 
> 
> Thanks for getting this regression. Please test the enclosed patch.

It doesn't enable the code if CONFIG_VIDEO_DEV=m, CONFIG_I2C=m.

And what should happen if CONFIG_VIDEO_DEV=y, CONFIG_I2C=m?

If the latter should offer this code to modules we'll have to put it 
into an own module.

> Cheers,
> Mauro
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
> 
> diff -r b0815101889d linux/drivers/media/video/v4l2-common.c
> --- a/linux/drivers/media/video/v4l2-common.c	Sun Jan 27 20:39:00 2008
> -0200 +++ b/linux/drivers/media/video/v4l2-common.c	Sun Jan 27 22:23:25
> 2008 -0200 @@ -1585,6 +1585,7 @@ u32 v4l2_ctrl_next(const u32 * const * c
>  	return **ctrl_classes;
>  }
>  
> +#ifdef CONFIG_I2C
>  int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32
> match_chip) {
>  	switch (match_type) {
> @@ -1596,6 +1597,7 @@ int v4l2_chip_match_i2c_client(struct i2
>  		return 0;
>  	}
>  }
> +EXPORT_SYMBOL(v4l2_chip_match_i2c_client);
>  
>  int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident
> *chip, u32 ident, u32 revision)
> @@ -1612,6 +1614,7 @@ int v4l2_chip_ident_i2c_client(struct i2
>  	}
>  	return 0;
>  }
> +EXPORT_SYMBOL(v4l2_chip_ident_i2c_client);
>  
>  int v4l2_chip_match_host(u32 match_type, u32 match_chip)
>  {
> @@ -1622,6 +1625,7 @@ int v4l2_chip_match_host(u32 match_type,
>  		return 0;
>  	}
>  }
> +EXPORT_SYMBOL(v4l2_chip_match_host);
>  
>  /* ----------------------------------------------------------------- */
>  
> @@ -1656,6 +1660,8 @@ int v4l2_i2c_attach(struct i2c_adapter *
>  	}
>  	return err != -ENOMEM ? 0 : err;
>  }
> +EXPORT_SYMBOL(v4l2_i2c_attach);
> +#endif
>  
>  /* ----------------------------------------------------------------- */
>  
> @@ -1679,15 +1685,3 @@ EXPORT_SYMBOL(v4l2_ctrl_query_menu);
>  EXPORT_SYMBOL(v4l2_ctrl_query_menu);
>  EXPORT_SYMBOL(v4l2_ctrl_query_fill);
>  EXPORT_SYMBOL(v4l2_ctrl_query_fill_std);
> -
> -EXPORT_SYMBOL(v4l2_chip_match_i2c_client);
> -EXPORT_SYMBOL(v4l2_chip_ident_i2c_client);
> -EXPORT_SYMBOL(v4l2_chip_match_host);
> -
> -EXPORT_SYMBOL(v4l2_i2c_attach);
> -
> -/*
> - * Local variables:
> - * c-basic-offset: 8
> - * End:
> - */

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2008-01-28  8:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 18:52 2.6.25 regression: VIDEO_DEV=y/m, I2C=n compile error Adrian Bunk
2008-01-28  0:33 ` Mauro Carvalho Chehab
2008-01-28  8:40   ` Adrian Bunk [this message]
2008-01-28  9:05     ` [v4l-dvb-maintainer] " Trent Piepho
2008-01-28 11:49       ` Mauro Carvalho Chehab
2008-01-28 12:12         ` Adrian Bunk
2008-01-28 12:22           ` Mauro Carvalho Chehab
2008-01-28 12:25             ` Mauro Carvalho Chehab
2008-01-29 16:38           ` Mauro Carvalho Chehab
2008-01-28 12:17       ` Jan Engelhardt
2008-01-28 12:25         ` Adrian Bunk
2008-02-01 19:24         ` Trent Piepho
2008-01-29 18:42       ` Mauro Carvalho Chehab

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=20080128084001.GB1001@does.not.exist \
    --to=bunk@kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mchehab@infradead.org \
    --cc=v4l-dvb-maintainer@linuxtv.org \
    /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;
as well as URLs for NNTP newsgroup(s).