diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-03 16:12:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 17:37:35 -0400 |
commit | 012d6b029ec17f45374303bbdccd0bc206725751 (patch) | |
tree | 35f0613ea11178ac7d3ffc2a779460121e673287 /drivers/media/video/gspca/spca561.c | |
parent | 66e4124f41808b50f6e1b6771621d6c7bf1c34a6 (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.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index b6a013f1dec4..2ca509daf0b4 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, | |||
560 | return 0; | 560 | return 0; |
561 | } | 561 | } |
562 | 562 | ||
563 | /* this function is called at open time */ | 563 | /* this function is called at probe and resume time */ |
564 | static int sd_open_12a(struct gspca_dev *gspca_dev) | 564 | static int sd_init_12a(struct gspca_dev *gspca_dev) |
565 | { | 565 | { |
566 | PDEBUG(D_STREAM, "Chip revision: 012a"); | 566 | PDEBUG(D_STREAM, "Chip revision: 012a"); |
567 | init_161rev12A(gspca_dev); | 567 | init_161rev12A(gspca_dev); |
568 | return 0; | 568 | return 0; |
569 | } | 569 | } |
570 | static int sd_open_72a(struct gspca_dev *gspca_dev) | 570 | static int sd_init_72a(struct gspca_dev *gspca_dev) |
571 | { | 571 | { |
572 | PDEBUG(D_STREAM, "Chip revision: 072a"); | 572 | PDEBUG(D_STREAM, "Chip revision: 072a"); |
573 | write_vector(gspca_dev, spca561_init_data); | 573 | write_vector(gspca_dev, spca561_init_data); |
@@ -733,12 +733,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) | |||
733 | reg_w_val(gspca_dev->dev, 0x8118, 0x29); | 733 | reg_w_val(gspca_dev->dev, 0x8118, 0x29); |
734 | reg_w_val(gspca_dev->dev, 0x8114, 0x08); | 734 | reg_w_val(gspca_dev->dev, 0x8114, 0x08); |
735 | } | 735 | } |
736 | } | 736 | /* reg_w_val(gspca_dev->dev, 0x8114, 0); */ |
737 | |||
738 | /* this function is called at close time */ | ||
739 | static void sd_close(struct gspca_dev *gspca_dev) | ||
740 | { | ||
741 | reg_w_val(gspca_dev->dev, 0x8114, 0); | ||
742 | } | 737 | } |
743 | 738 | ||
744 | static void do_autogain(struct gspca_dev *gspca_dev) | 739 | static void do_autogain(struct gspca_dev *gspca_dev) |
@@ -1121,11 +1116,10 @@ static const struct sd_desc sd_desc_12a = { | |||
1121 | .ctrls = sd_ctrls_12a, | 1116 | .ctrls = sd_ctrls_12a, |
1122 | .nctrls = ARRAY_SIZE(sd_ctrls_12a), | 1117 | .nctrls = ARRAY_SIZE(sd_ctrls_12a), |
1123 | .config = sd_config, | 1118 | .config = sd_config, |
1124 | .open = sd_open_12a, | 1119 | .init = sd_init_12a, |
1125 | .start = sd_start_12a, | 1120 | .start = sd_start_12a, |
1126 | .stopN = sd_stopN, | 1121 | .stopN = sd_stopN, |
1127 | .stop0 = sd_stop0, | 1122 | .stop0 = sd_stop0, |
1128 | .close = sd_close, | ||
1129 | .pkt_scan = sd_pkt_scan, | 1123 | .pkt_scan = sd_pkt_scan, |
1130 | /* .dq_callback = do_autogain, * fixme */ | 1124 | /* .dq_callback = do_autogain, * fixme */ |
1131 | }; | 1125 | }; |
@@ -1134,11 +1128,10 @@ static const struct sd_desc sd_desc_72a = { | |||
1134 | .ctrls = sd_ctrls_72a, | 1128 | .ctrls = sd_ctrls_72a, |
1135 | .nctrls = ARRAY_SIZE(sd_ctrls_72a), | 1129 | .nctrls = ARRAY_SIZE(sd_ctrls_72a), |
1136 | .config = sd_config, | 1130 | .config = sd_config, |
1137 | .open = sd_open_72a, | 1131 | .init = sd_init_72a, |
1138 | .start = sd_start_72a, | 1132 | .start = sd_start_72a, |
1139 | .stopN = sd_stopN, | 1133 | .stopN = sd_stopN, |
1140 | .stop0 = sd_stop0, | 1134 | .stop0 = sd_stop0, |
1141 | .close = sd_close, | ||
1142 | .pkt_scan = sd_pkt_scan, | 1135 | .pkt_scan = sd_pkt_scan, |
1143 | .dq_callback = do_autogain, | 1136 | .dq_callback = do_autogain, |
1144 | }; | 1137 | }; |