aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-04-04 16:11:06 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:45:29 -0400
commit990e3743b505a0bb08c04a381d5477e19d31ef5e (patch)
treea56c7f35b3bd14d0fa3a178dfad673bb43415772 /drivers/media
parent7e81d8254d4f00817b98588fce1afb448ccc14a9 (diff)
V4L/DVB (5504): Sn9c102: Make driver V4L2 not V4L1
sn9c102 is a v4l2 driver, except it used a couple v4l1 helper functions. Stop using those functions and depend on V4L2 in Kconfig. Acked-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/sn9c102/Kconfig2
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c30
2 files changed, 16 insertions, 16 deletions
diff --git a/drivers/media/video/sn9c102/Kconfig b/drivers/media/video/sn9c102/Kconfig
index 1a7ccb666ab0..19204f5686e1 100644
--- a/drivers/media/video/sn9c102/Kconfig
+++ b/drivers/media/video/sn9c102/Kconfig
@@ -1,6 +1,6 @@
1config USB_SN9C102 1config USB_SN9C102
2 tristate "USB SN9C1xx PC Camera Controller support" 2 tristate "USB SN9C1xx PC Camera Controller support"
3 depends on USB && VIDEO_V4L1 3 depends on USB && VIDEO_V4L2
4 ---help--- 4 ---help---
5 Say Y here if you want support for cameras based on SONiX SN9C101, 5 Say Y here if you want support for cameras based on SONiX SN9C101,
6 SN9C102, SN9C103, SN9C105 and SN9C120 PC Camera Controllers. 6 SN9C102, SN9C103, SN9C105 and SN9C120 PC Camera Controllers.
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index c0e6c3bbe64d..89f83354de3b 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1420,35 +1420,35 @@ static CLASS_DEVICE_ATTR(frame_header, S_IRUGO,
1420 1420
1421static int sn9c102_create_sysfs(struct sn9c102_device* cam) 1421static int sn9c102_create_sysfs(struct sn9c102_device* cam)
1422{ 1422{
1423 struct video_device *v4ldev = cam->v4ldev; 1423 struct class_device *classdev = &(cam->v4ldev->class_dev);
1424 int err = 0; 1424 int err = 0;
1425 1425
1426 if ((err = video_device_create_file(v4ldev, &class_device_attr_reg))) 1426 if ((err = class_device_create_file(classdev, &class_device_attr_reg)))
1427 goto err_out; 1427 goto err_out;
1428 if ((err = video_device_create_file(v4ldev, &class_device_attr_val))) 1428 if ((err = class_device_create_file(classdev, &class_device_attr_val)))
1429 goto err_reg; 1429 goto err_reg;
1430 if ((err = video_device_create_file(v4ldev, 1430 if ((err = class_device_create_file(classdev,
1431 &class_device_attr_frame_header))) 1431 &class_device_attr_frame_header)))
1432 goto err_val; 1432 goto err_val;
1433 1433
1434 if (cam->sensor.sysfs_ops) { 1434 if (cam->sensor.sysfs_ops) {
1435 if ((err = video_device_create_file(v4ldev, 1435 if ((err = class_device_create_file(classdev,
1436 &class_device_attr_i2c_reg))) 1436 &class_device_attr_i2c_reg)))
1437 goto err_frame_header; 1437 goto err_frame_header;
1438 if ((err = video_device_create_file(v4ldev, 1438 if ((err = class_device_create_file(classdev,
1439 &class_device_attr_i2c_val))) 1439 &class_device_attr_i2c_val)))
1440 goto err_i2c_reg; 1440 goto err_i2c_reg;
1441 } 1441 }
1442 1442
1443 if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102) { 1443 if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102) {
1444 if ((err = video_device_create_file(v4ldev, 1444 if ((err = class_device_create_file(classdev,
1445 &class_device_attr_green))) 1445 &class_device_attr_green)))
1446 goto err_i2c_val; 1446 goto err_i2c_val;
1447 } else { 1447 } else {
1448 if ((err = video_device_create_file(v4ldev, 1448 if ((err = class_device_create_file(classdev,
1449 &class_device_attr_blue))) 1449 &class_device_attr_blue)))
1450 goto err_i2c_val; 1450 goto err_i2c_val;
1451 if ((err = video_device_create_file(v4ldev, 1451 if ((err = class_device_create_file(classdev,
1452 &class_device_attr_red))) 1452 &class_device_attr_red)))
1453 goto err_blue; 1453 goto err_blue;
1454 } 1454 }
@@ -1456,19 +1456,19 @@ static int sn9c102_create_sysfs(struct sn9c102_device* cam)
1456 return 0; 1456 return 0;
1457 1457
1458err_blue: 1458err_blue:
1459 video_device_remove_file(v4ldev, &class_device_attr_blue); 1459 class_device_remove_file(classdev, &class_device_attr_blue);
1460err_i2c_val: 1460err_i2c_val:
1461 if (cam->sensor.sysfs_ops) 1461 if (cam->sensor.sysfs_ops)
1462 video_device_remove_file(v4ldev, &class_device_attr_i2c_val); 1462 class_device_remove_file(classdev, &class_device_attr_i2c_val);
1463err_i2c_reg: 1463err_i2c_reg:
1464 if (cam->sensor.sysfs_ops) 1464 if (cam->sensor.sysfs_ops)
1465 video_device_remove_file(v4ldev, &class_device_attr_i2c_reg); 1465 class_device_remove_file(classdev, &class_device_attr_i2c_reg);
1466err_frame_header: 1466err_frame_header:
1467 video_device_remove_file(v4ldev, &class_device_attr_frame_header); 1467 class_device_remove_file(classdev, &class_device_attr_frame_header);
1468err_val: 1468err_val:
1469 video_device_remove_file(v4ldev, &class_device_attr_val); 1469 class_device_remove_file(classdev, &class_device_attr_val);
1470err_reg: 1470err_reg:
1471 video_device_remove_file(v4ldev, &class_device_attr_reg); 1471 class_device_remove_file(classdev, &class_device_attr_reg);
1472err_out: 1472err_out:
1473 return err; 1473 return err;
1474} 1474}