diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-06 09:59:42 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:24 -0400 |
commit | 09a7480ec127d26cade353b49f912c3348f6532e (patch) | |
tree | 5f1a7c248eb711d6134c3bd8e7cb919188613d57 /drivers/media/video/gspca/m5602 | |
parent | a594fb4866ddebcb413577974654be8cffc37a1b (diff) |
V4L/DVB (11454): gspca - m5602-mt9m111: Remove the unused power_down struct member
The power_down sensor struct member is almost has no purpose in the current driver abstraction. Remove it.
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.c | 5 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.h | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.c | 17 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.h | 22 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.c | 5 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.h | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 5 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.h | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k83a.c | 5 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k83a.h | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_sensor.h | 3 |
11 files changed, 0 insertions, 70 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c index 43791a6b8d2..519548d07af 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c | |||
@@ -165,11 +165,6 @@ int mt9m111_init(struct sd *sd) | |||
165 | return (err < 0) ? err : 0; | 165 | return (err < 0) ? err : 0; |
166 | } | 166 | } |
167 | 167 | ||
168 | int mt9m111_power_down(struct sd *sd) | ||
169 | { | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | void mt9m111_disconnect(struct sd *sd) | 168 | void mt9m111_disconnect(struct sd *sd) |
174 | { | 169 | { |
175 | sd->sensor = NULL; | 170 | sd->sensor = NULL; |
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h index 03769fc0442..91386324757 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h | |||
@@ -85,7 +85,6 @@ extern int dump_sensor; | |||
85 | 85 | ||
86 | int mt9m111_probe(struct sd *sd); | 86 | int mt9m111_probe(struct sd *sd); |
87 | int mt9m111_init(struct sd *sd); | 87 | int mt9m111_init(struct sd *sd); |
88 | int mt9m111_power_down(struct sd *sd); | ||
89 | void mt9m111_disconnect(struct sd *sd); | 88 | void mt9m111_disconnect(struct sd *sd); |
90 | 89 | ||
91 | int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val); | 90 | int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val); |
@@ -103,7 +102,6 @@ const static struct m5602_sensor mt9m111 = { | |||
103 | 102 | ||
104 | .probe = mt9m111_probe, | 103 | .probe = mt9m111_probe, |
105 | .init = mt9m111_init, | 104 | .init = mt9m111_init, |
106 | .power_down = mt9m111_power_down, | ||
107 | .disconnect = mt9m111_disconnect, | 105 | .disconnect = mt9m111_disconnect, |
108 | }; | 106 | }; |
109 | 107 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index fc4548fd441..5ea93a85b7d 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c | |||
@@ -467,26 +467,9 @@ int ov9650_stop(struct sd *sd) | |||
467 | return m5602_write_sensor(sd, OV9650_COM2, &data, 1); | 467 | return m5602_write_sensor(sd, OV9650_COM2, &data, 1); |
468 | } | 468 | } |
469 | 469 | ||
470 | int ov9650_power_down(struct sd *sd) | ||
471 | { | ||
472 | int i, err = 0; | ||
473 | for (i = 0; i < ARRAY_SIZE(power_down_ov9650) && !err; i++) { | ||
474 | u8 data = power_down_ov9650[i][2]; | ||
475 | if (power_down_ov9650[i][0] == SENSOR) | ||
476 | err = m5602_write_sensor(sd, | ||
477 | power_down_ov9650[i][1], &data, 1); | ||
478 | else | ||
479 | err = m5602_write_bridge(sd, power_down_ov9650[i][1], | ||
480 | data); | ||
481 | } | ||
482 | |||
483 | return err; | ||
484 | } | ||
485 | |||
486 | void ov9650_disconnect(struct sd *sd) | 470 | void ov9650_disconnect(struct sd *sd) |
487 | { | 471 | { |
488 | ov9650_stop(sd); | 472 | ov9650_stop(sd); |
489 | ov9650_power_down(sd); | ||
490 | 473 | ||
491 | sd->sensor = NULL; | 474 | sd->sensor = NULL; |
492 | kfree(sd->sensor_priv); | 475 | kfree(sd->sensor_priv); |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h index fcc54e4c0f4..b81f26505e2 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.h +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h | |||
@@ -137,7 +137,6 @@ int ov9650_probe(struct sd *sd); | |||
137 | int ov9650_init(struct sd *sd); | 137 | int ov9650_init(struct sd *sd); |
138 | int ov9650_start(struct sd *sd); | 138 | int ov9650_start(struct sd *sd); |
139 | int ov9650_stop(struct sd *sd); | 139 | int ov9650_stop(struct sd *sd); |
140 | int ov9650_power_down(struct sd *sd); | ||
141 | void ov9650_disconnect(struct sd *sd); | 140 | void ov9650_disconnect(struct sd *sd); |
142 | 141 | ||
143 | int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val); | 142 | int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val); |
@@ -167,7 +166,6 @@ const static struct m5602_sensor ov9650 = { | |||
167 | .init = ov9650_init, | 166 | .init = ov9650_init, |
168 | .start = ov9650_start, | 167 | .start = ov9650_start, |
169 | .stop = ov9650_stop, | 168 | .stop = ov9650_stop, |
170 | .power_down = ov9650_power_down, | ||
171 | .disconnect = ov9650_disconnect, | 169 | .disconnect = ov9650_disconnect, |
172 | }; | 170 | }; |
173 | 171 | ||
@@ -312,26 +310,6 @@ static const unsigned char init_ov9650[][3] = | |||
312 | {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X}, | 310 | {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X}, |
313 | }; | 311 | }; |
314 | 312 | ||
315 | static const unsigned char power_down_ov9650[][3] = | ||
316 | { | ||
317 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04}, | ||
318 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
319 | {SENSOR, OV9650_COM7, 0x80}, | ||
320 | {SENSOR, OV9650_OFON, 0xf4}, | ||
321 | {SENSOR, OV9650_MVFP, 0x80}, | ||
322 | {SENSOR, OV9650_DBLV, 0x3f}, | ||
323 | {SENSOR, OV9650_RSVD36, 0x49}, | ||
324 | {SENSOR, OV9650_COM7, 0x05}, | ||
325 | |||
326 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05}, | ||
327 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04}, | ||
328 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
329 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x06}, | ||
330 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02}, | ||
331 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04}, | ||
332 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
333 | }; | ||
334 | |||
335 | static const unsigned char res_init_ov9650[][3] = | 313 | static const unsigned char res_init_ov9650[][3] = |
336 | { | 314 | { |
337 | {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X}, | 315 | {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X}, |
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 27596fd6152..1e9a3066067 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c | |||
@@ -397,11 +397,6 @@ int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
397 | return err; | 397 | return err; |
398 | } | 398 | } |
399 | 399 | ||
400 | int po1030_power_down(struct sd *sd) | ||
401 | { | ||
402 | return 0; | ||
403 | } | ||
404 | |||
405 | void po1030_disconnect(struct sd *sd) | 400 | void po1030_disconnect(struct sd *sd) |
406 | { | 401 | { |
407 | sd->sensor = NULL; | 402 | sd->sensor = NULL; |
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/video/gspca/m5602/m5602_po1030.h index 4c04d1b9a1b..c55c31a913d 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.h +++ b/drivers/media/video/gspca/m5602/m5602_po1030.h | |||
@@ -126,7 +126,6 @@ extern int dump_sensor; | |||
126 | 126 | ||
127 | int po1030_probe(struct sd *sd); | 127 | int po1030_probe(struct sd *sd); |
128 | int po1030_init(struct sd *sd); | 128 | int po1030_init(struct sd *sd); |
129 | int po1030_power_down(struct sd *sd); | ||
130 | void po1030_disconnect(struct sd *sd); | 129 | void po1030_disconnect(struct sd *sd); |
131 | 130 | ||
132 | int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); | 131 | int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); |
@@ -150,7 +149,6 @@ static const struct m5602_sensor po1030 = { | |||
150 | 149 | ||
151 | .probe = po1030_probe, | 150 | .probe = po1030_probe, |
152 | .init = po1030_init, | 151 | .init = po1030_init, |
153 | .power_down = po1030_power_down, | ||
154 | .disconnect = po1030_disconnect, | 152 | .disconnect = po1030_disconnect, |
155 | }; | 153 | }; |
156 | 154 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 84ca7532c75..e8fbeac626c 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -308,11 +308,6 @@ int s5k4aa_init(struct sd *sd) | |||
308 | return (err < 0) ? err : 0; | 308 | return (err < 0) ? err : 0; |
309 | } | 309 | } |
310 | 310 | ||
311 | int s5k4aa_power_down(struct sd *sd) | ||
312 | { | ||
313 | return 0; | ||
314 | } | ||
315 | |||
316 | int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) | 311 | int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) |
317 | { | 312 | { |
318 | struct sd *sd = (struct sd *) gspca_dev; | 313 | struct sd *sd = (struct sd *) gspca_dev; |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h index 958fb72d405..9ffcb5d1a13 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h | |||
@@ -66,7 +66,6 @@ extern int dump_sensor; | |||
66 | int s5k4aa_probe(struct sd *sd); | 66 | int s5k4aa_probe(struct sd *sd); |
67 | int s5k4aa_init(struct sd *sd); | 67 | int s5k4aa_init(struct sd *sd); |
68 | int s5k4aa_start(struct sd *sd); | 68 | int s5k4aa_start(struct sd *sd); |
69 | int s5k4aa_power_down(struct sd *sd); | ||
70 | void s5k4aa_disconnect(struct sd *sd); | 69 | void s5k4aa_disconnect(struct sd *sd); |
71 | 70 | ||
72 | int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); | 71 | int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); |
@@ -86,7 +85,6 @@ static const struct m5602_sensor s5k4aa = { | |||
86 | .probe = s5k4aa_probe, | 85 | .probe = s5k4aa_probe, |
87 | .init = s5k4aa_init, | 86 | .init = s5k4aa_init, |
88 | .start = s5k4aa_start, | 87 | .start = s5k4aa_start, |
89 | .power_down = s5k4aa_power_down, | ||
90 | .disconnect = s5k4aa_disconnect, | 88 | .disconnect = s5k4aa_disconnect, |
91 | }; | 89 | }; |
92 | 90 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/video/gspca/m5602/m5602_s5k83a.c index c77afcab179..b43a3b04a82 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.c | |||
@@ -298,11 +298,6 @@ void s5k83a_disconnect(struct sd *sd) | |||
298 | kfree(sens_priv); | 298 | kfree(sens_priv); |
299 | } | 299 | } |
300 | 300 | ||
301 | int s5k83a_power_down(struct sd *sd) | ||
302 | { | ||
303 | return 0; | ||
304 | } | ||
305 | |||
306 | int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val) | 301 | int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val) |
307 | { | 302 | { |
308 | struct sd *sd = (struct sd *) gspca_dev; | 303 | struct sd *sd = (struct sd *) gspca_dev; |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.h b/drivers/media/video/gspca/m5602/m5602_s5k83a.h index 9ca3ca311c8..02a5e25598c 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.h | |||
@@ -47,7 +47,6 @@ int s5k83a_probe(struct sd *sd); | |||
47 | int s5k83a_init(struct sd *sd); | 47 | int s5k83a_init(struct sd *sd); |
48 | int s5k83a_start(struct sd *sd); | 48 | int s5k83a_start(struct sd *sd); |
49 | int s5k83a_stop(struct sd *sd); | 49 | int s5k83a_stop(struct sd *sd); |
50 | int s5k83a_power_down(struct sd *sd); | ||
51 | void s5k83a_disconnect(struct sd *sd); | 50 | void s5k83a_disconnect(struct sd *sd); |
52 | 51 | ||
53 | int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val); | 52 | int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val); |
@@ -67,7 +66,6 @@ static const struct m5602_sensor s5k83a = { | |||
67 | .init = s5k83a_init, | 66 | .init = s5k83a_init, |
68 | .start = s5k83a_start, | 67 | .start = s5k83a_start, |
69 | .stop = s5k83a_stop, | 68 | .stop = s5k83a_stop, |
70 | .power_down = s5k83a_power_down, | ||
71 | .disconnect = s5k83a_disconnect, | 69 | .disconnect = s5k83a_disconnect, |
72 | .i2c_slave_id = 0x5a, | 70 | .i2c_slave_id = 0x5a, |
73 | .i2c_regW = 2, | 71 | .i2c_regW = 2, |
diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 0d3026936f2..987dcb23ec6 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h | |||
@@ -61,9 +61,6 @@ struct m5602_sensor { | |||
61 | 61 | ||
62 | /* Executed when the device is disconnected */ | 62 | /* Executed when the device is disconnected */ |
63 | void (*disconnect)(struct sd *sd); | 63 | void (*disconnect)(struct sd *sd); |
64 | |||
65 | /* Performs a power down sequence */ | ||
66 | int (*power_down)(struct sd *sd); | ||
67 | }; | 64 | }; |
68 | 65 | ||
69 | #endif | 66 | #endif |