summaryrefslogtreecommitdiff
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-03-07 16:32:33 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 07:43:31 -0300
commit76e41a655ae68b3e0468a3ef497a57415a77b54b (patch)
tree5a5ffcc1cb9c6e3b03f9d455fc3209a136f81496 /drivers/media/common
parentfaab6820b3c11ca62fd2284d2e5174ccb0650b05 (diff)
downloadlinux-3.10-76e41a655ae68b3e0468a3ef497a57415a77b54b.tar.gz
linux-3.10-76e41a655ae68b3e0468a3ef497a57415a77b54b.tar.bz2
linux-3.10-76e41a655ae68b3e0468a3ef497a57415a77b54b.zip
[media] siano: use a separate completion for stats
Instead of re-use tune_done also for stats, the better is to use a different completion. Also, it was noticed that sometimes, the driver answers with MSG_SMS_SIGNAL_DETECTED_IND for status request. Fix the code to also handle those other signal indicators. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/siano/smsdvb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/common/siano/smsdvb.c b/drivers/media/common/siano/smsdvb.c
index 57f3560514a..f4fd6703c49 100644
--- a/drivers/media/common/siano/smsdvb.c
+++ b/drivers/media/common/siano/smsdvb.c
@@ -48,6 +48,7 @@ struct smsdvb_client_t {
fe_status_t fe_status;
struct completion tune_done;
+ struct completion stats_done;
struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb;
int event_fe_state;
@@ -349,7 +350,6 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
pReceptionData->ErrorTSPackets = 0;
}
- complete(&client->tune_done);
break;
}
default:
@@ -376,6 +376,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
client->fe_status = 0;
sms_board_dvb3_event(client, DVB3_EVENT_FE_UNLOCK);
}
+ complete(&client->stats_done);
}
return 0;
@@ -471,7 +472,7 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
sizeof(struct SmsMsgHdr_ST), 0 };
rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
- &client->tune_done);
+ &client->stats_done);
return rc;
}
@@ -1002,6 +1003,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
client->coredev = coredev;
init_completion(&client->tune_done);
+ init_completion(&client->stats_done);
kmutex_lock(&g_smsdvb_clientslock);