X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fmedia%2Fsn9c102_tas5130d1b.c;fp=drivers%2Fusb%2Fmedia%2Fsn9c102_tas5130d1b.c;h=a0728f0ae00cdd72ea5890aab6835176f9e192fb;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=b378e941bbe81b7e8c2e61db028a64f78ecc4fa9;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/usb/media/sn9c102_tas5130d1b.c b/drivers/usb/media/sn9c102_tas5130d1b.c index b378e941b..a0728f0ae 100644 --- a/drivers/usb/media/sn9c102_tas5130d1b.c +++ b/drivers/usb/media/sn9c102_tas5130d1b.c @@ -2,7 +2,7 @@ * Plug-in for TAS5130D1B image sensor connected to the SN9C10x PC Camera * * Controllers * * * - * Copyright (C) 2004-2005 by Luca Risolia * + * Copyright (C) 2004-2006 by Luca Risolia * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -24,8 +24,6 @@ static struct sn9c102_sensor tas5130d1b; -static struct v4l2_control tas5130d1b_gain, tas5130d1b_exposure; - static int tas5130d1b_init(struct sn9c102_device* cam) { @@ -44,24 +42,6 @@ static int tas5130d1b_init(struct sn9c102_device* cam) } -static int tas5130d1b_get_ctrl(struct sn9c102_device* cam, - struct v4l2_control* ctrl) -{ - switch (ctrl->id) { - case V4L2_CID_GAIN: - ctrl->value = tas5130d1b_gain.value; - break; - case V4L2_CID_EXPOSURE: - ctrl->value = tas5130d1b_exposure.value; - break; - default: - return -EINVAL; - } - - return 0; -} - - static int tas5130d1b_set_ctrl(struct sn9c102_device* cam, const struct v4l2_control* ctrl) { @@ -69,12 +49,10 @@ static int tas5130d1b_set_ctrl(struct sn9c102_device* cam, switch (ctrl->id) { case V4L2_CID_GAIN: - if (!(err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value))) - tas5130d1b_gain.value = ctrl->value; + err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value); break; case V4L2_CID_EXPOSURE: - if (!(err += sn9c102_i2c_write(cam, 0x40, 0x47 - ctrl->value))) - tas5130d1b_exposure.value = ctrl->value; + err += sn9c102_i2c_write(cam, 0x40, 0x47 - ctrl->value); break; default: return -EINVAL; @@ -147,7 +125,6 @@ static struct sn9c102_sensor tas5130d1b = { .flags = 0, }, }, - .get_ctrl = &tas5130d1b_get_ctrl, .set_ctrl = &tas5130d1b_set_ctrl, .cropcap = { .bounds = {