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/spca501.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/spca501.c')
-rw-r--r-- | drivers/media/video/gspca/spca501.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index 525f1b3400e4..e9eb59bae4fb 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -1953,8 +1953,8 @@ error: | |||
1953 | return -EINVAL; | 1953 | return -EINVAL; |
1954 | } | 1954 | } |
1955 | 1955 | ||
1956 | /* this function is called at open time */ | 1956 | /* this function is called at probe and resume time */ |
1957 | static int sd_open(struct gspca_dev *gspca_dev) | 1957 | static int sd_init(struct gspca_dev *gspca_dev) |
1958 | { | 1958 | { |
1959 | struct sd *sd = (struct sd *) gspca_dev; | 1959 | struct sd *sd = (struct sd *) gspca_dev; |
1960 | 1960 | ||
@@ -2023,11 +2023,6 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
2023 | 2023 | ||
2024 | static void sd_stop0(struct gspca_dev *gspca_dev) | 2024 | static void sd_stop0(struct gspca_dev *gspca_dev) |
2025 | { | 2025 | { |
2026 | } | ||
2027 | |||
2028 | /* this function is called at close time */ | ||
2029 | static void sd_close(struct gspca_dev *gspca_dev) | ||
2030 | { | ||
2031 | reg_write(gspca_dev->dev, SPCA501_REG_CTLRL, 0x05, 0x00); | 2026 | reg_write(gspca_dev->dev, SPCA501_REG_CTLRL, 0x05, 0x00); |
2032 | } | 2027 | } |
2033 | 2028 | ||
@@ -2120,11 +2115,10 @@ static const struct sd_desc sd_desc = { | |||
2120 | .ctrls = sd_ctrls, | 2115 | .ctrls = sd_ctrls, |
2121 | .nctrls = ARRAY_SIZE(sd_ctrls), | 2116 | .nctrls = ARRAY_SIZE(sd_ctrls), |
2122 | .config = sd_config, | 2117 | .config = sd_config, |
2123 | .open = sd_open, | 2118 | .init = sd_init, |
2124 | .start = sd_start, | 2119 | .start = sd_start, |
2125 | .stopN = sd_stopN, | 2120 | .stopN = sd_stopN, |
2126 | .stop0 = sd_stop0, | 2121 | .stop0 = sd_stop0, |
2127 | .close = sd_close, | ||
2128 | .pkt_scan = sd_pkt_scan, | 2122 | .pkt_scan = sd_pkt_scan, |
2129 | }; | 2123 | }; |
2130 | 2124 | ||