make hdpvr build without CONFIG_I2C Signed-off-by: Janne Grunau --- diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile index 79ad2e1..145163b 100644 --- a/drivers/media/video/hdpvr/Makefile +++ b/drivers/media/video/hdpvr/Makefile @@ -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 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 #include #include +#include #include #include @@ -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);