[linuxtv-commits] [hg:v4l-dvb] cx18: remove firmware size check

2008-07-20 Thread Patch from Hans Verkuil
The patch number 8423 was added via Hans Verkuil [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Hans Verkuil  [EMAIL PROTECTED]
cx18: remove firmware size check


This check was an ivtv leftover that served no purpose for the cx18.
Removed it, as this allows the user to load different firmware versions.

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-firmware.c |   54 -
 1 file changed, 13 insertions(+), 41 deletions(-)

diff -r 31f58d666d39 -r 4ea29edc8f35 
linux/drivers/media/video/cx18/cx18-firmware.c
--- a/linux/drivers/media/video/cx18/cx18-firmware.cSat Jul 19 01:14:31 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-firmware.cSat Jul 19 13:34:12 
2008 +0200
@@ -86,10 +86,6 @@
 
 #define CX18_DSP0_INTERRUPT_MASK   0xd0004C
 
-/* Encoder/decoder firmware sizes */
-#define CX18_FW_CPU_SIZE   (158332)
-#define CX18_FW_APU_SIZE   (141200)
-
 #define APU_ROM_SYNC1 0x6D676553 /* mgeS */
 #define APU_ROM_SYNC2 0x72646548 /* rdeH */
 
@@ -100,35 +96,22 @@ struct cx18_apu_rom_seghdr {
u32 size;
 };
 
-static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 
*cx, long size)
+static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
u32 __iomem *dst = (u32 __iomem *)mem;
const u32 *src;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(Unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(Unable to open firmware %s\n, fn);
CX18_ERR(Did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
 
src = (const u32 *)fw-data;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. So we check
-  filesizes to see if at least the right-sized file was
-  loaded. If not, then we retry. */
-   CX18_INFO(retry: file loaded was not %s (expected size %ld, 
got %zd)\n,
-   fn, size, fw-size);
-   release_firmware(fw);
-   retries--;
-   goto retry;
-   }
for (i = 0; i  fw-size; i += 4096) {
setup_page(i);
for (j = i; j  fw-size  j  i + 4096; j += 4) {
@@ -145,15 +128,16 @@ retry:
}
if (!test_bit(CX18_F_I_LOADED_FW, cx-i_flags))
CX18_INFO(loaded %s firmware (%zd bytes)\n, fn, fw-size);
+   size = fw-size;
release_firmware(fw);
return size;
 }
 
-static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 
*cx, long size)
+static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
const u32 *src;
struct cx18_apu_rom_seghdr seghdr;
const u8 *vers;
@@ -161,10 +145,8 @@ static int load_apu_fw_direct(const char
u32 apu_version = 0;
int sz;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(unable to open firmware %s\n, fn);
CX18_ERR(did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
@@ -173,19 +155,8 @@ retry:
vers = fw-data + sizeof(seghdr);
sz = fw-size;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. So we check
-  filesizes to see if at least the right-sized file was
-  loaded. If not, then we retry. */
-   CX18_INFO(retry: file loaded was not %s (expected size %ld, 
got %zd)\n,
-  fn, size, fw-size);
-   release_firmware(fw);
-   retries--;
-   goto retry;
-   }
apu_version = (vers[0]  24) | (vers[4]  16) | vers[32];
-   while (offset + sizeof(seghdr)  size) {
+   while (offset + sizeof(seghdr)  fw-size) {
/* TODO: byteswapping */
  

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8426 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |1 +
 linux/drivers/media/video/videobuf-dma-contig.c  |8 
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -r dbf11a308e97 -r 57fdbaeec956 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Sun Jul 20 08:31:29 
2008 -0300
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Sun Jul 20 08:33:59 
2008 -0300
@@ -91,6 +91,7 @@ struct sh_mobile_ceu_dev {
void __iomem *base;
unsigned long video_limit;
 
+   /* lock used to protect videobuf */
spinlock_t lock;
struct list_head capture;
struct videobuf_buffer *active;
diff -r dbf11a308e97 -r 57fdbaeec956 
linux/drivers/media/video/videobuf-dma-contig.c
--- a/linux/drivers/media/video/videobuf-dma-contig.c   Sun Jul 20 08:31:29 
2008 -0300
+++ b/linux/drivers/media/video/videobuf-dma-contig.c   Sun Jul 20 08:33:59 
2008 -0300
@@ -29,10 +29,10 @@ struct videobuf_dma_contig_memory {
 };
 
 #define MAGIC_DC_MEM 0x0733ac61
-#define MAGIC_CHECK(is, should)
\
-   if (unlikely((is) != (should))) {   \
-   pr_err(magic mismatch: %x expected %x\n, is, should); \
-   BUG();  \
+#define MAGIC_CHECK(is, should)
\
+   if (unlikely((is) != (should))) {   \
+   pr_err(magic mismatch: %x expected %x\n, (is), (should)); \
+   BUG();  \
}
 
 static void


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/57fdbaeec956cedb940fbd785e324969225507f1

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8424 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cs5345.c |2 
 linux/drivers/media/video/cx18/cx18-firmware.c |   54 -
 2 files changed, 14 insertions(+), 42 deletions(-)

diff -r 2a87f885fc36 -r dbf11a308e97 linux/drivers/media/video/cs5345.c
--- a/linux/drivers/media/video/cs5345.cSun Jul 20 08:05:50 2008 -0300
+++ b/linux/drivers/media/video/cs5345.cSun Jul 20 08:31:29 2008 -0300
@@ -117,7 +117,7 @@ static int cs5345_command(struct i2c_cli
if (cmd == VIDIOC_DBG_G_REGISTER)
reg-val = cs5345_read(client, reg-reg  0x1f);
else
-   cs5345_write(client, reg-reg  0x1f, reg-val  0x1f);
+   cs5345_write(client, reg-reg  0x1f, reg-val  0xff);
break;
}
 #endif
diff -r 2a87f885fc36 -r dbf11a308e97 
linux/drivers/media/video/cx18/cx18-firmware.c
--- a/linux/drivers/media/video/cx18/cx18-firmware.cSun Jul 20 08:05:50 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-firmware.cSun Jul 20 08:31:29 
2008 -0300
@@ -86,10 +86,6 @@
 
 #define CX18_DSP0_INTERRUPT_MASK   0xd0004C
 
-/* Encoder/decoder firmware sizes */
-#define CX18_FW_CPU_SIZE   (158332)
-#define CX18_FW_APU_SIZE   (141200)
-
 #define APU_ROM_SYNC1 0x6D676553 /* mgeS */
 #define APU_ROM_SYNC2 0x72646548 /* rdeH */
 
@@ -100,35 +96,22 @@ struct cx18_apu_rom_seghdr {
u32 size;
 };
 
-static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 
*cx, long size)
+static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
u32 __iomem *dst = (u32 __iomem *)mem;
const u32 *src;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(Unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(Unable to open firmware %s\n, fn);
CX18_ERR(Did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
 
src = (const u32 *)fw-data;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. So we check
-  filesizes to see if at least the right-sized file was
-  loaded. If not, then we retry. */
-   CX18_INFO(retry: file loaded was not %s (expected size %ld, 
got %zd)\n,
-   fn, size, fw-size);
-   release_firmware(fw);
-   retries--;
-   goto retry;
-   }
for (i = 0; i  fw-size; i += 4096) {
setup_page(i);
for (j = i; j  fw-size  j  i + 4096; j += 4) {
@@ -145,15 +128,16 @@ retry:
}
if (!test_bit(CX18_F_I_LOADED_FW, cx-i_flags))
CX18_INFO(loaded %s firmware (%zd bytes)\n, fn, fw-size);
+   size = fw-size;
release_firmware(fw);
return size;
 }
 
-static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 
*cx, long size)
+static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
const u32 *src;
struct cx18_apu_rom_seghdr seghdr;
const u8 *vers;
@@ -161,10 +145,8 @@ static int load_apu_fw_direct(const char
u32 apu_version = 0;
int sz;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(unable to open firmware %s\n, fn);
CX18_ERR(did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
@@ -173,19 +155,8 @@ retry:
vers = fw-data + sizeof(seghdr);
sz = fw-size;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. 

[linuxtv-commits] [hg:v4l-dvb] videodev: split off the ioctl handling into v4l2-ioctl.c

2008-07-20 Thread Patch from Hans Verkuil
The patch number 8427 was added via Hans Verkuil [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Hans Verkuil  [EMAIL PROTECTED]
videodev: split off the ioctl handling into v4l2-ioctl.c


videodev.c became top-heavy so all the ioctl processing has been split off
into v4l2-ioctl.c. This means videodev.c is back to its original purpose:
creating and registering v4l devices.

Since videodev.c and v4l2-ioctl.c should still remain one module (as least
for now) I also had to rename videodev.c to v4l2-dev.c to prevent a
circular dependency when building a videodev.ko module. This is not a bad
thing, since the source and header now have the same name. And the v4l2-
prefix is useful to see which sources are generic v4l2 support code.

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/Makefile   |2 
 linux/drivers/media/video/v4l2-dev.c |  500 +
 linux/drivers/media/video/videodev.c | 2338 ---
 3 files changed, 502 insertions(+), 2338 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/29616ae5e7d34559ac642bc512f53faa03846c8c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] videodev: rename 'dev' to 'parent'

2008-07-20 Thread Patch from Hans Verkuil
The patch number 8428 was added via Hans Verkuil [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Hans Verkuil  [EMAIL PROTECTED]
videodev: rename 'dev' to 'parent'


The field 'dev' is not the video device, but the parent of the video device.
Rename accordingly.

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/bt8xx/bttv-driver.c |4 ++--
 linux/drivers/media/video/cafe_ccic.c |2 +-
 linux/drivers/media/video/cx18/cx18-streams.c |2 +-
 linux/drivers/media/video/cx23885/cx23885-417.c   |2 +-
 linux/drivers/media/video/cx23885/cx23885-video.c |2 +-
 linux/drivers/media/video/cx88/cx88-core.c|2 +-
 linux/drivers/media/video/em28xx/em28xx-video.c   |2 +-
 linux/drivers/media/video/gspca/gspca.c   |2 +-
 linux/drivers/media/video/ivtv/ivtv-streams.c |2 +-
 linux/drivers/media/video/meye.c  |2 +-
 linux/drivers/media/video/mt9m001.c   |2 +-
 linux/drivers/media/video/ov511.c |2 +-
 linux/drivers/media/video/pwc/pwc-if.c|2 +-
 linux/drivers/media/video/s2255drv.c  |2 +-
 linux/drivers/media/video/saa7134/saa7134-core.c  |2 +-
 linux/drivers/media/video/saa7134/saa7134-empress.c   |2 +-
 linux/drivers/media/video/soc_camera.c|   10 +-
 linux/drivers/media/video/stk-webcam.c|2 +-
 linux/drivers/media/video/stv680.c|2 +-
 linux/drivers/media/video/usbvideo/usbvideo.c |2 +-
 linux/drivers/media/video/usbvision/usbvision-video.c |2 +-
 linux/drivers/media/video/uvc/uvc_driver.c|2 +-
 linux/drivers/media/video/v4l2-dev.c  |   10 +-
 linux/drivers/media/video/w9968cf.c   |2 +-
 linux/include/media/v4l2-dev.h|2 +-
 25 files changed, 34 insertions(+), 34 deletions(-)

diff -r 29616ae5e7d3 -r db7029e2fe8c 
linux/drivers/media/video/bt8xx/bttv-driver.c
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jul 20 13:43:17 
2008 +0200
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jul 20 11:31:39 
2008 +0200
@@ -164,7 +164,7 @@ static ssize_t show_card(struct device *
 struct device_attribute *attr, char *buf)
 {
struct video_device *vfd = container_of(cd, struct video_device, 
class_dev);
-   struct bttv *btv = dev_get_drvdata(vfd-dev);
+   struct bttv *btv = dev_get_drvdata(vfd-parent);
return sprintf(buf, %d\n, btv ? btv-c.type : UNSET);
 }
 static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
@@ -4209,7 +4209,7 @@ static struct video_device *vdev_init(st
return NULL;
*vfd = *template;
vfd-minor   = -1;
-   vfd-dev = btv-c.pci-dev;
+   vfd-parent  = btv-c.pci-dev;
vfd-release = video_device_release;
vfd-type= type;
vfd-debug   = bttv_debug;
diff -r 29616ae5e7d3 -r db7029e2fe8c linux/drivers/media/video/cafe_ccic.c
--- a/linux/drivers/media/video/cafe_ccic.c Sun Jul 20 13:43:17 2008 +0200
+++ b/linux/drivers/media/video/cafe_ccic.c Sun Jul 20 11:31:39 2008 +0200
@@ -2164,7 +2164,7 @@ static int cafe_pci_probe(struct pci_dev
cam-v4ldev = cafe_v4l_template;
cam-v4ldev.debug = 0;
 // cam-v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
-   cam-v4ldev.dev = pdev-dev;
+   cam-v4ldev.parent = pdev-dev;
ret = video_register_device(cam-v4ldev, VFL_TYPE_GRABBER, -1);
if (ret)
goto out_smbus;
diff -r 29616ae5e7d3 -r db7029e2fe8c 
linux/drivers/media/video/cx18/cx18-streams.c
--- a/linux/drivers/media/video/cx18/cx18-streams.c Sun Jul 20 13:43:17 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-streams.c Sun Jul 20 11:31:39 
2008 +0200
@@ -194,7 +194,7 @@ static int cx18_prep_dev(struct cx18 *cx
cx-num);
 
s-v4l2dev-minor = minor;
-   s-v4l2dev-dev = cx-dev-dev;
+   s-v4l2dev-parent = cx-dev-dev;
s-v4l2dev-fops = cx18_stream_info[type].fops;
s-v4l2dev-release = video_device_release;
s-v4l2dev-tvnorms = V4L2_STD_ALL;
diff -r 29616ae5e7d3 -r db7029e2fe8c 
linux/drivers/media/video/cx23885/cx23885-417.c
--- a/linux/drivers/media/video/cx23885/cx23885-417.c   Sun Jul 20 13:43:17 
2008 +0200
+++ b/linux/drivers/media/video/cx23885/cx23885-417.c   Sun Jul 20 11:31:39 
2008 +0200
@@ -1774,7 +1774,7 @@ static struct video_device *cx23885_vide
vfd-minor   = -1;
snprintf(vfd-name, sizeof(vfd-name), %s %s 

[linuxtv-commits] [hg:v4l-dvb] videodev: renamed 'class_dev' to 'dev'

2008-07-20 Thread Patch from Hans Verkuil
The patch number 8429 was added via Hans Verkuil [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Hans Verkuil  [EMAIL PROTECTED]
videodev: renamed 'class_dev' to 'dev'


The class_dev field is a normal device, not a class device. This is very
confusing and now that the old 'dev' field has been renamed to 'parent'
we can rename 'class_dev' to just 'dev'.

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/bt8xx/bttv-driver.c |4 
 linux/drivers/media/video/et61x251/et61x251_core.c|2 
 linux/drivers/media/video/sn9c102/sn9c102_core.c  |   60 +++-
 linux/drivers/media/video/usbvision/usbvision-video.c |   72 +++---
 linux/drivers/media/video/v4l2-dev.c  |   47 ++
 linux/include/media/v4l2-dev.h|   20 +-
 6 files changed, 86 insertions(+), 119 deletions(-)

diff -r db7029e2fe8c -r c5f2bca6511b 
linux/drivers/media/video/bt8xx/bttv-driver.c
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jul 20 11:31:39 
2008 +0200
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jul 20 11:35:02 
2008 +0200
@@ -163,7 +163,7 @@ static ssize_t show_card(struct device *
 static ssize_t show_card(struct device *cd,
 struct device_attribute *attr, char *buf)
 {
-   struct video_device *vfd = container_of(cd, struct video_device, 
class_dev);
+   struct video_device *vfd = container_of(cd, struct video_device, dev);
struct bttv *btv = dev_get_drvdata(vfd-parent);
return sprintf(buf, %d\n, btv ? btv-c.type : UNSET);
 }
@@ -4268,7 +4268,7 @@ static int __devinit bttv_register_video
goto err;
printk(KERN_INFO bttv%d: registered device video%d\n,
   btv-c.nr,btv-video_dev-minor  0x1f);
-   if (device_create_file(btv-video_dev-class_dev,
+   if (device_create_file(btv-video_dev-dev,
 dev_attr_card)0) {
printk(KERN_ERR bttv%d: device_create_file 'card' 
   failed\n, btv-c.nr);
diff -r db7029e2fe8c -r c5f2bca6511b 
linux/drivers/media/video/et61x251/et61x251_core.c
--- a/linux/drivers/media/video/et61x251/et61x251_core.cSun Jul 20 
11:31:39 2008 +0200
+++ b/linux/drivers/media/video/et61x251/et61x251_core.cSun Jul 20 
11:35:02 2008 +0200
@@ -989,7 +989,7 @@ static DEVICE_ATTR(i2c_val, S_IRUGO | S_
 
 static int et61x251_create_sysfs(struct et61x251_device* cam)
 {
-   struct device *classdev = (cam-v4ldev-class_dev);
+   struct device *classdev = (cam-v4ldev-dev);
int err = 0;
 
if ((err = device_create_file(classdev, dev_attr_reg)))
diff -r db7029e2fe8c -r c5f2bca6511b 
linux/drivers/media/video/sn9c102/sn9c102_core.c
--- a/linux/drivers/media/video/sn9c102/sn9c102_core.c  Sun Jul 20 11:31:39 
2008 +0200
+++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c  Sun Jul 20 11:35:02 
2008 +0200
@@ -1042,8 +1042,7 @@ static ssize_t sn9c102_show_reg(struct d
if (mutex_lock_interruptible(sn9c102_sysfs_lock))
return -ERESTARTSYS;
 
-   cam = video_get_drvdata(container_of(cd, struct video_device,
-class_dev));
+   cam = video_get_drvdata(container_of(cd, struct video_device, dev));
if (!cam) {
mutex_unlock(sn9c102_sysfs_lock);
return -ENODEV;
@@ -1068,8 +1067,7 @@ sn9c102_store_reg(struct device* cd, str
if (mutex_lock_interruptible(sn9c102_sysfs_lock))
return -ERESTARTSYS;
 
-   cam = video_get_drvdata(container_of(cd, struct video_device,
-class_dev));
+   cam = video_get_drvdata(container_of(cd, struct video_device, dev));
if (!cam) {
mutex_unlock(sn9c102_sysfs_lock);
return -ENODEV;
@@ -1102,8 +1100,7 @@ static ssize_t sn9c102_show_val(struct d
if (mutex_lock_interruptible(sn9c102_sysfs_lock))
return -ERESTARTSYS;
 
-   cam = video_get_drvdata(container_of(cd, struct video_device,
-class_dev));
+   cam = video_get_drvdata(container_of(cd, struct video_device, dev));
if (!cam) {
mutex_unlock(sn9c102_sysfs_lock);
return -ENODEV;
@@ -1136,8 +1133,7 @@ sn9c102_store_val(struct device* cd, str
if (mutex_lock_interruptible(sn9c102_sysfs_lock))
return -ERESTARTSYS;
 
-   cam = video_get_drvdata(container_of(cd, struct video_device,
-class_dev));
+   cam = 

[linuxtv-commits] [hg:v4l-dvb] Some few kernel syncs: update i2c-id.h and cleans whitespace on a Kconfig file

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8432 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Some few kernel syncs: update i2c-id.h and cleans whitespace on a Kconfig file


kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |4 ++--
 linux/include/linux/i2c-id.h  |3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff -r a99bafdac5a7 -r 527f3e1f973c linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Sun Jul 20 09:36:07 2008 -0300
+++ b/linux/drivers/media/video/Kconfig Sun Jul 20 09:39:24 2008 -0300
@@ -641,8 +641,8 @@ config VIDEO_ZORAN_ZR36060
depends on VIDEO_ZORAN
help
  Say Y to support Zoran boards based on 36060 chips.
- This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33 
- and 33 R10 and AverMedia 6 boards. 
+ This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33
+ and 33 R10 and AverMedia 6 boards.
 
 config VIDEO_ZORAN_BUZ
tristate Iomega Buz support
diff -r a99bafdac5a7 -r 527f3e1f973c linux/include/linux/i2c-id.h
--- a/linux/include/linux/i2c-id.h  Sun Jul 20 09:36:07 2008 -0300
+++ b/linux/include/linux/i2c-id.h  Sun Jul 20 09:39:24 2008 -0300
@@ -84,8 +84,6 @@
 #define I2C_DRIVERID_M5279095  /* Mitsubishi M52790SP/FP AV switch */
 #define I2C_DRIVERID_CS534596  /* cs5345 audio processor   */
 
-#define I2C_DRIVERID_I2CDEV900
-
 #define I2C_DRIVERID_OV7670 1048   /* Omnivision 7670 camera */
 
 /*
@@ -104,7 +102,6 @@
 #define I2C_HW_B_RIVA  0x010010 /* Riva based graphics cards */
 #define I2C_HW_B_IOC   0x010011 /* IOC bit-wiggling */
 #define I2C_HW_B_IXP2000   0x010016 /* GPIO on IXP2000 systems */
-#define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */
 #define I2C_HW_B_ZR36067   0x010019 /* Zoran-36057/36067 based boards */
 #define I2C_HW_B_PCILYNX   0x01001a /* TI PCILynx I2C adapter */
 #define I2C_HW_B_CX2388x   0x01001b /* connexant 2388x based tv cards */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/527f3e1f973c187c5c00340490dfd4808c276c5c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits