summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-camera.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-03-24 16:33:11 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 13:09:54 -0300
commit2c52a2fce0f00479548a076d900d1a2ddd001c27 (patch)
tree17459ae37f288b8f595474f1e1481f23620fd81e /drivers/media/usb/em28xx/em28xx-camera.c
parentabc1308f0bb89d1e59d1eccb71f85161f8e80108 (diff)
[media] em28xx: move struct v4l2_clk *clk from struct em28xx to struct v4l2
The current clock definition applies only to the V4L2 side of the driver. Move its struct pointer to the v4l2_dev, where it belongs. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-camera.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-camera.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-camera.c b/drivers/media/usb/em28xx/em28xx-camera.c
index daebef39769..c2672b4f454 100644
--- a/drivers/media/usb/em28xx/em28xx-camera.c
+++ b/drivers/media/usb/em28xx/em28xx-camera.c
@@ -330,13 +330,14 @@ int em28xx_init_camera(struct em28xx *dev)
char clk_name[V4L2_SUBDEV_NAME_SIZE];
struct i2c_client *client = &dev->i2c_client[dev->def_i2c_bus];
struct i2c_adapter *adap = &dev->i2c_adap[dev->def_i2c_bus];
+ struct em28xx_v4l2 *v4l2 = dev->v4l2;
int ret = 0;
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
i2c_adapter_id(adap), client->addr);
- dev->clk = v4l2_clk_register_fixed(clk_name, "mclk", -EINVAL);
- if (IS_ERR(dev->clk))
- return PTR_ERR(dev->clk);
+ v4l2->clk = v4l2_clk_register_fixed(clk_name, "mclk", -EINVAL);
+ if (IS_ERR(v4l2->clk))
+ return PTR_ERR(v4l2->clk);
switch (dev->em28xx_sensor) {
case EM28XX_MT9V011:
@@ -448,8 +449,8 @@ int em28xx_init_camera(struct em28xx *dev)
}
if (ret < 0) {
- v4l2_clk_unregister_fixed(dev->clk);
- dev->clk = NULL;
+ v4l2_clk_unregister_fixed(v4l2->clk);
+ v4l2->clk = NULL;
}
return ret;