rpms/kernel/F-11 hdpvr-ir-enable.patch,1.2,1.3
Jarod Wilson
jwilson at fedoraproject.org
Mon Aug 31 14:28:07 UTC 2009
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19592
Modified Files:
hdpvr-ir-enable.patch
Log Message:
Add correct hdpvr ir enable patch here too
hdpvr-ir-enable.patch:
Makefile | 4 +---
hdpvr-core.c | 7 +++----
hdpvr-i2c.c | 38 ++++++++++++++++++++++++++++++++------
3 files changed, 36 insertions(+), 13 deletions(-)
Index: hdpvr-ir-enable.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/hdpvr-ir-enable.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- hdpvr-ir-enable.patch 10 Aug 2009 20:19:22 -0000 1.2
+++ hdpvr-ir-enable.patch 31 Aug 2009 14:28:07 -0000 1.3
@@ -1,29 +1,62 @@
From http://hg.jannau.net/hdpvr/, pending v4l-dvb pull request
---
- drivers/media/video/hdpvr/hdpvr-core.c | 3 +-
- drivers/media/video/hdpvr/hdpvr-i2c.c | 36 +++++++++++++++++++++++++------
- 2 files changed, 30 insertions(+), 9 deletions(-)
+ drivers/media/video/hdpvr/Makefile | 4 +--
+ drivers/media/video/hdpvr/hdpvr-core.c | 7 ++---
+ drivers/media/video/hdpvr/hdpvr-i2c.c | 38 ++++++++++++++++++++++++++-----
+ 3 files changed, 36 insertions(+), 13 deletions(-)
+diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
+index e0230fc..79ad2e1 100644
+--- a/drivers/media/video/hdpvr/Makefile
++++ b/drivers/media/video/hdpvr/Makefile
+@@ -1,6 +1,4 @@
+-hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o
+-
+-hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o
++hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.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 188bd5a..878d1e5 100644
+index 188bd5a..9fa3d8d 100644
--- a/drivers/media/video/hdpvr/hdpvr-core.c
+++ b/drivers/media/video/hdpvr/hdpvr-core.c
-@@ -363,8 +363,7 @@ static int hdpvr_probe(struct usb_interface *interface,
+@@ -362,9 +362,8 @@ static int hdpvr_probe(struct usb_interface *interface,
+ goto error;
}
- #ifdef CONFIG_I2C
+-#ifdef CONFIG_I2C
- /* until i2c is working properly */
- retval = 0; /* hdpvr_register_i2c_adapter(dev); */
++#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+ retval = hdpvr_register_i2c_adapter(dev);
if (retval < 0) {
v4l2_err(&dev->v4l2_dev, "registering i2c adapter failed\n");
goto error;
+@@ -414,7 +413,7 @@ static void hdpvr_disconnect(struct usb_interface *interface)
+ mutex_unlock(&dev->io_mutex);
+
+ /* deregister I2C adapter */
+-#ifdef CONFIG_I2C
++#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+ mutex_lock(&dev->i2c_mutex);
+ if (dev->i2c_adapter)
+ i2c_del_adapter(dev->i2c_adapter);
diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c
-index c4b5d15..1c01b6c 100644
+index c4b5d15..994305c 100644
--- a/drivers/media/video/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/video/hdpvr/hdpvr-i2c.c
-@@ -22,7 +22,7 @@
+@@ -10,6 +10,8 @@
+ *
+ */
+
++#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
++
+ #include <linux/i2c.h>
+
+ #include "hdpvr.h"
+@@ -22,7 +24,7 @@
#define REQTYPE_I2C_WRITE_STATT 0xd0
static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
@@ -32,7 +65,7 @@ index c4b5d15..1c01b6c 100644
{
int ret;
char *buf = kmalloc(len, GFP_KERNEL);
-@@ -32,7 +32,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
+@@ -32,7 +34,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
ret = usb_control_msg(dev->udev,
usb_rcvctrlpipe(dev->udev, 0),
REQTYPE_I2C_READ, CTRL_READ_REQUEST,
@@ -41,7 +74,7 @@ index c4b5d15..1c01b6c 100644
if (ret == len) {
memcpy(data, buf, len);
-@@ -46,7 +46,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
+@@ -46,7 +48,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
}
static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
@@ -50,7 +83,7 @@ index c4b5d15..1c01b6c 100644
{
int ret;
char *buf = kmalloc(len, GFP_KERNEL);
-@@ -57,14 +57,14 @@ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
+@@ -57,7 +59,7 @@ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
ret = usb_control_msg(dev->udev,
usb_sndctrlpipe(dev->udev, 0),
REQTYPE_I2C_WRITE, CTRL_WRITE_REQUEST,
@@ -59,15 +92,7 @@ index c4b5d15..1c01b6c 100644
if (ret < 0)
goto error;
-
- ret = usb_control_msg(dev->udev,
- usb_rcvctrlpipe(dev->udev, 0),
-- REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
-+ REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
- 0, 0, buf, 2, 1000);
-
- if (ret == 2)
-@@ -93,10 +93,10 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
+@@ -93,10 +95,10 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
if (msgs[i].flags & I2C_M_RD)
retval = hdpvr_i2c_read(dev, addr, msgs[i].buf,
@@ -80,7 +105,7 @@ index c4b5d15..1c01b6c 100644
}
mutex_unlock(&dev->i2c_mutex);
-@@ -114,6 +114,26 @@ static struct i2c_algorithm hdpvr_algo = {
+@@ -114,6 +116,26 @@ static struct i2c_algorithm hdpvr_algo = {
.functionality = hdpvr_functionality,
};
@@ -107,7 +132,7 @@ index c4b5d15..1c01b6c 100644
int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
{
struct i2c_adapter *i2c_adap;
-@@ -123,6 +143,8 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
+@@ -123,6 +145,8 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
if (i2c_adap == NULL)
goto error;
@@ -116,3 +141,9 @@ index c4b5d15..1c01b6c 100644
strlcpy(i2c_adap->name, "Hauppauge HD PVR I2C",
sizeof(i2c_adap->name));
i2c_adap->algo = &hdpvr_algo;
+@@ -143,3 +167,5 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
+ error:
+ return retval;
+ }
++
++#endif /* CONFIG_I2C */
More information about the scm-commits
mailing list