aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-09 22:14:22 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 16:25:11 -0400
commit5275a3b6b01664317b1a0bdc95ad981dbbb62283 (patch)
tree84b8463cf336074556d7c1a93816219d8a9daf69 /drivers/media/tuners
parent2930977ac5934540d876715fdf32b1dd6f405df5 (diff)
[media] xc5000: be sure that the firmware is there before set params
Now that xc5000_set_params() is also called during resume, move the code that checks for the firmware to happen there. This way, the firmware will be loaded either for analog or digital TV when .resume callback is called. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/xc5000.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index c1905784b08e..512fe508bcd2 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -1040,6 +1040,11 @@ static int xc5000_set_params(struct dvb_frontend *fe)
1040{ 1040{
1041 struct xc5000_priv *priv = fe->tuner_priv; 1041 struct xc5000_priv *priv = fe->tuner_priv;
1042 1042
1043 if (xc_load_fw_and_init_tuner(fe, 0) != 0) {
1044 dprintk(1, "Unable to load firmware and init tuner\n");
1045 return -EINVAL;
1046 }
1047
1043 switch (priv->mode) { 1048 switch (priv->mode) {
1044 case V4L2_TUNER_RADIO: 1049 case V4L2_TUNER_RADIO:
1045 return xc5000_set_radio_freq(fe); 1050 return xc5000_set_radio_freq(fe);
@@ -1061,11 +1066,6 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe,
1061 if (priv->i2c_props.adap == NULL) 1066 if (priv->i2c_props.adap == NULL)
1062 return -EINVAL; 1067 return -EINVAL;
1063 1068
1064 if (xc_load_fw_and_init_tuner(fe, 0) != 0) {
1065 dprintk(1, "Unable to load firmware and init tuner\n");
1066 return -EINVAL;
1067 }
1068
1069 switch (params->mode) { 1069 switch (params->mode) {
1070 case V4L2_TUNER_RADIO: 1070 case V4L2_TUNER_RADIO:
1071 ret = xc5000_config_radio(fe, params); 1071 ret = xc5000_config_radio(fe, params);