From 6584af2799555f05b6545f667d94f780cbb24a1c Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 30 Mar 2009 00:20:26 +0200 Subject: v4l2-subdev: add load_fw and use that instead of abusing core->init. From: Hans Verkuil The init callback was used in several places to load firmware. Make a separate load_fw callback for that. This makes the code a lot more understandable. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx231xx/cx231xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index d1872988a..8d445775e 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -317,7 +317,7 @@ void cx231xx_card_setup(struct cx231xx *dev) "cx25840", "cx25840", 0x88 >> 1); if (dev->sd_cx25840 == NULL) cx231xx_info("cx25840 subdev registration failure\n"); - cx25840_call(dev, core, init, 0); + cx25840_call(dev, core, load_fw); } -- cgit v1.2.3 From f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 1 Apr 2009 08:57:53 +0200 Subject: v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev From: Hans Verkuil The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx231xx/cx231xx-cards.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index 8d445775e..653899db8 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -312,8 +312,8 @@ void cx231xx_card_setup(struct cx231xx *dev) /* request some modules */ if (dev->board.decoder == CX231XX_AVDECODER) { - dev->sd_cx25840 = - v4l2_i2c_new_subdev(&dev->i2c_bus[0].i2c_adap, + dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, + &dev->i2c_bus[0].i2c_adap, "cx25840", "cx25840", 0x88 >> 1); if (dev->sd_cx25840 == NULL) cx231xx_info("cx25840 subdev registration failure\n"); @@ -322,8 +322,8 @@ void cx231xx_card_setup(struct cx231xx *dev) } if (dev->board.tuner_type != TUNER_ABSENT) { - dev->sd_tuner = - v4l2_i2c_new_subdev(&dev->i2c_bus[1].i2c_adap, + dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, + &dev->i2c_bus[1].i2c_adap, "tuner", "tuner", 0xc2 >> 1); if (dev->sd_tuner == NULL) cx231xx_info("tuner subdev registration failure\n"); -- cgit v1.2.3 From d0b11e4e4cdf69b5d04acf91e630747b4fde4f8f Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 1 Apr 2009 13:39:29 +0200 Subject: cx231xx: use usb_interface.dev for v4l2_device_register From: Janne Grunau Priority: normal Signed-off-by: Janne Grunau --- linux/drivers/media/video/cx231xx/cx231xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index d1872988a..0574782c1 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -685,7 +685,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, /* Create v4l2 device */ snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", "cx231xx", nr); - retval = v4l2_device_register(&udev->dev, &dev->v4l2_dev); + retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { cx231xx_errdev("v4l2_device_register failed\n"); cx231xx_devused &= ~(1 << nr); -- cgit v1.2.3 From 4ad3ea8b9d538ad4a929c87979fd4118ec0c0508 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 1 Apr 2009 13:41:13 +0200 Subject: cx231xx: remove explicitly set v4l2_device.name From: Janne Grunau Priority: normal Signed-off-by: Janne Grunau --- linux/drivers/media/video/cx231xx/cx231xx-cards.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index 0574782c1..245c49e9d 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -683,8 +683,6 @@ static int cx231xx_usb_probe(struct usb_interface *interface, */ /* Create v4l2 device */ - snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), - "%s-%03d", "cx231xx", nr); retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { cx231xx_errdev("v4l2_device_register failed\n"); -- cgit v1.2.3 From b4d23428b3c4456414ad8bf5e974757fd354a66f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 2 Apr 2009 16:26:22 +0200 Subject: v4l2-subdev: change s_routing prototype From: Hans Verkuil It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx231xx/cx231xx-cards.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'linux/drivers/media/video/cx231xx/cx231xx-cards.c') diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c index 653899db8..2758958f9 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c @@ -358,10 +358,7 @@ int cx231xx_config(struct cx231xx *dev) */ void cx231xx_config_i2c(struct cx231xx *dev) { - struct v4l2_routing route; - - route.input = INPUT(dev->video_input)->vmux; - route.output = 0; + /* u32 input = INPUT(dev->video_input)->vmux; */ call_all(dev, video, s_stream, 1); } -- cgit v1.2.3