linux-next: Tree for March 23 (media/video/hdpvr)
Commit Message
Hi,
On Mon, Mar 23, 2009 at 11:48:05AM -0700, Randy Dunlap wrote:
> Stephen Rothwell wrote:
> >
> > Changes since 20090320:
>
> > The v4l-dvb tree gained a build failure for which I have reverted 3 commits.
>
> drivers/built-in.o: In function `hdpvr_disconnect':
> hdpvr-core.c:(.text+0xf3894): undefined reference to `i2c_del_adapter'
> drivers/built-in.o: In function `hdpvr_register_i2c_adapter':
> (.text+0xf4145): undefined reference to `i2c_add_adapter'
>
>
> CONFIG_I2C is not enabled.
following patch should fix that.
Janne
ps: Mauro, I'll send a pull request shortly
make hdpvr build without CONFIG_I2C
Signed-off-by: Janne Grunau <j@jannau.net>
---
Comments
Janne Grunau wrote:
> Hi,
>
> On Mon, Mar 23, 2009 at 11:48:05AM -0700, Randy Dunlap wrote:
>> Stephen Rothwell wrote:
>>> Changes since 20090320:
>>> The v4l-dvb tree gained a build failure for which I have reverted 3 commits.
>> drivers/built-in.o: In function `hdpvr_disconnect':
>> hdpvr-core.c:(.text+0xf3894): undefined reference to `i2c_del_adapter'
>> drivers/built-in.o: In function `hdpvr_register_i2c_adapter':
>> (.text+0xf4145): undefined reference to `i2c_add_adapter'
>>
>>
>> CONFIG_I2C is not enabled.
>
> following patch should fix that.
Ack. Thanks.
> Janne
>
> ps: Mauro, I'll send a pull request shortly
On Monday 23 March 2009 21:49:40 Janne Grunau wrote:
> Hi,
>
> On Mon, Mar 23, 2009 at 11:48:05AM -0700, Randy Dunlap wrote:
> > Stephen Rothwell wrote:
> > >
> > > Changes since 20090320:
> >
> > > The v4l-dvb tree gained a build failure for which I have reverted 3 commits.
> >
> > drivers/built-in.o: In function `hdpvr_disconnect':
> > hdpvr-core.c:(.text+0xf3894): undefined reference to `i2c_del_adapter'
> > drivers/built-in.o: In function `hdpvr_register_i2c_adapter':
> > (.text+0xf4145): undefined reference to `i2c_add_adapter'
> >
> >
> > CONFIG_I2C is not enabled.
>
> following patch should fix that.
>
> Janne
>
> ps: Mauro, I'll send a pull request shortly
>
> diff --git a/drivers/media/video/hdpvr/hdpvr-core.c
> b/drivers/media/video/hdpvr/hdpvr-core.c index e7300b5..dadb2e7 100644
> --- a/drivers/media/video/hdpvr/hdpvr-core.c
> +++ b/drivers/media/video/hdpvr/hdpvr-core.c
> @@ -21,6 +21,7 @@
> #include <linux/usb.h>
> #include <linux/mutex.h>
> #include <linux/i2c.h>
> +#include <linux/autoconf.h>
>
> #include <linux/videodev2.h>
> #include <media/v4l2-dev.h>
Hi Janne,
Don't include autoconf.h! It's preloaded for you already and shouldn't be
included manually. Esp. since the v4l-dvb tree creates and preloads a custom
version. Loading it manually will overwrite that.
Other than that it's fine.
Regards,
Hans
On Mon, Mar 23, 2009 at 10:04:15PM +0100, Hans Verkuil wrote:
> On Monday 23 March 2009 21:49:40 Janne Grunau wrote:
> >
> > diff --git a/drivers/media/video/hdpvr/hdpvr-core.c
> > b/drivers/media/video/hdpvr/hdpvr-core.c index e7300b5..dadb2e7 100644
> > --- a/drivers/media/video/hdpvr/hdpvr-core.c
> > +++ b/drivers/media/video/hdpvr/hdpvr-core.c
> > @@ -21,6 +21,7 @@
> > #include <linux/usb.h>
> > #include <linux/mutex.h>
> > #include <linux/i2c.h>
> > +#include <linux/autoconf.h>
> >
> > #include <linux/videodev2.h>
> > #include <media/v4l2-dev.h>
>
> Don't include autoconf.h! It's preloaded for you already and shouldn't be
> included manually. Esp. since the v4l-dvb tree creates and preloads a custom
> version. Loading it manually will overwrite that.
>
> Other than that it's fine.
Thanks Hans,
fixed in the patch sent to Mauro.
Janne
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -1,4 +1,6 @@
-hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.o
+hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o
+
+hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o
obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
@@ -21,6 +21,7 @@
#include <linux/usb.h>
#include <linux/mutex.h>
#include <linux/i2c.h>
+#include <linux/autoconf.h>
#include <linux/videodev2.h>
#include <media/v4l2-dev.h>
@@ -389,12 +390,14 @@ static void hdpvr_disconnect(struct usb_interface *interface)
mutex_unlock(&dev->io_mutex);
/* deregister I2C adapter */
+#ifdef CONFIG_I2C
mutex_lock(&dev->i2c_mutex);
if (dev->i2c_adapter)
i2c_del_adapter(dev->i2c_adapter);
kfree(dev->i2c_adapter);
dev->i2c_adapter = NULL;
mutex_unlock(&dev->i2c_mutex);
+#endif /* CONFIG_I2C */
atomic_dec(&dev_nr);