diff options
Diffstat (limited to 'drivers/media/v4l2-core/tuner-core.c')
-rw-r--r-- | drivers/media/v4l2-core/tuner-core.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 82852f23a3b6..7f858c39753c 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c | |||
@@ -1099,23 +1099,14 @@ static int tuner_s_radio(struct v4l2_subdev *sd) | |||
1099 | */ | 1099 | */ |
1100 | 1100 | ||
1101 | /** | 1101 | /** |
1102 | * tuner_s_power - controls the power state of the tuner | 1102 | * tuner_standby - places the tuner in standby mode |
1103 | * @sd: pointer to struct v4l2_subdev | 1103 | * @sd: pointer to struct v4l2_subdev |
1104 | * @on: a zero value puts the tuner to sleep, non-zero wakes it up | ||
1105 | */ | 1104 | */ |
1106 | static int tuner_s_power(struct v4l2_subdev *sd, int on) | 1105 | static int tuner_standby(struct v4l2_subdev *sd) |
1107 | { | 1106 | { |
1108 | struct tuner *t = to_tuner(sd); | 1107 | struct tuner *t = to_tuner(sd); |
1109 | struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; | 1108 | struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; |
1110 | 1109 | ||
1111 | if (on) { | ||
1112 | if (t->standby && set_mode(t, t->mode) == 0) { | ||
1113 | dprintk("Waking up tuner\n"); | ||
1114 | set_freq(t, 0); | ||
1115 | } | ||
1116 | return 0; | ||
1117 | } | ||
1118 | |||
1119 | dprintk("Putting tuner to sleep\n"); | 1110 | dprintk("Putting tuner to sleep\n"); |
1120 | t->standby = true; | 1111 | t->standby = true; |
1121 | if (analog_ops->standby) | 1112 | if (analog_ops->standby) |
@@ -1328,10 +1319,10 @@ static int tuner_command(struct i2c_client *client, unsigned cmd, void *arg) | |||
1328 | 1319 | ||
1329 | static const struct v4l2_subdev_core_ops tuner_core_ops = { | 1320 | static const struct v4l2_subdev_core_ops tuner_core_ops = { |
1330 | .log_status = tuner_log_status, | 1321 | .log_status = tuner_log_status, |
1331 | .s_power = tuner_s_power, | ||
1332 | }; | 1322 | }; |
1333 | 1323 | ||
1334 | static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = { | 1324 | static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = { |
1325 | .standby = tuner_standby, | ||
1335 | .s_radio = tuner_s_radio, | 1326 | .s_radio = tuner_s_radio, |
1336 | .g_tuner = tuner_g_tuner, | 1327 | .g_tuner = tuner_g_tuner, |
1337 | .s_tuner = tuner_s_tuner, | 1328 | .s_tuner = tuner_s_tuner, |