summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca561.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 17:12:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 18:37:35 -0300
commit012d6b029ec17f45374303bbdccd0bc206725751 (patch)
tree35f0613ea11178ac7d3ffc2a779460121e673287 /drivers/media/video/gspca/spca561.c
parent66e4124f41808b50f6e1b6771621d6c7bf1c34a6 (diff)
V4L/DVB (8822): gspca: Change some subdriver functions for suspend/resume.
- new function 'init' called on probe and resume - remove the functions 'open' and 'closed' - 'stopN' and 'stop0' are optional Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/spca561.c')
-rw-r--r--drivers/media/video/gspca/spca561.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c
index b6a013f1dec..2ca509daf0b 100644
--- a/drivers/media/video/gspca/spca561.c
+++ b/drivers/media/video/gspca/spca561.c
@@ -560,14 +560,14 @@ static int sd_config(struct gspca_dev *gspca_dev,
return 0;
}
-/* this function is called at open time */
-static int sd_open_12a(struct gspca_dev *gspca_dev)
+/* this function is called at probe and resume time */
+static int sd_init_12a(struct gspca_dev *gspca_dev)
{
PDEBUG(D_STREAM, "Chip revision: 012a");
init_161rev12A(gspca_dev);
return 0;
}
-static int sd_open_72a(struct gspca_dev *gspca_dev)
+static int sd_init_72a(struct gspca_dev *gspca_dev)
{
PDEBUG(D_STREAM, "Chip revision: 072a");
write_vector(gspca_dev, spca561_init_data);
@@ -733,12 +733,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
reg_w_val(gspca_dev->dev, 0x8118, 0x29);
reg_w_val(gspca_dev->dev, 0x8114, 0x08);
}
-}
-
-/* this function is called at close time */
-static void sd_close(struct gspca_dev *gspca_dev)
-{
- reg_w_val(gspca_dev->dev, 0x8114, 0);
+/* reg_w_val(gspca_dev->dev, 0x8114, 0); */
}
static void do_autogain(struct gspca_dev *gspca_dev)
@@ -1121,11 +1116,10 @@ static const struct sd_desc sd_desc_12a = {
.ctrls = sd_ctrls_12a,
.nctrls = ARRAY_SIZE(sd_ctrls_12a),
.config = sd_config,
- .open = sd_open_12a,
+ .init = sd_init_12a,
.start = sd_start_12a,
.stopN = sd_stopN,
.stop0 = sd_stop0,
- .close = sd_close,
.pkt_scan = sd_pkt_scan,
/* .dq_callback = do_autogain, * fixme */
};
@@ -1134,11 +1128,10 @@ static const struct sd_desc sd_desc_72a = {
.ctrls = sd_ctrls_72a,
.nctrls = ARRAY_SIZE(sd_ctrls_72a),
.config = sd_config,
- .open = sd_open_72a,
+ .init = sd_init_72a,
.start = sd_start_72a,
.stopN = sd_stopN,
.stop0 = sd_stop0,
- .close = sd_close,
.pkt_scan = sd_pkt_scan,
.dq_callback = do_autogain,
};