diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-07 14:32:33 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 06:43:31 -0400 |
commit | 76e41a655ae68b3e0468a3ef497a57415a77b54b (patch) | |
tree | 5a5ffcc1cb9c6e3b03f9d455fc3209a136f81496 | |
parent | faab6820b3c11ca62fd2284d2e5174ccb0650b05 (diff) |
[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>
-rw-r--r-- | drivers/media/common/siano/smsdvb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/common/siano/smsdvb.c b/drivers/media/common/siano/smsdvb.c index 57f3560514ab..f4fd6703c49e 100644 --- a/drivers/media/common/siano/smsdvb.c +++ b/drivers/media/common/siano/smsdvb.c | |||
@@ -48,6 +48,7 @@ struct smsdvb_client_t { | |||
48 | fe_status_t fe_status; | 48 | fe_status_t fe_status; |
49 | 49 | ||
50 | struct completion tune_done; | 50 | struct completion tune_done; |
51 | struct completion stats_done; | ||
51 | 52 | ||
52 | struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb; | 53 | struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb; |
53 | int event_fe_state; | 54 | int event_fe_state; |
@@ -349,7 +350,6 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) | |||
349 | pReceptionData->ErrorTSPackets = 0; | 350 | pReceptionData->ErrorTSPackets = 0; |
350 | } | 351 | } |
351 | 352 | ||
352 | complete(&client->tune_done); | ||
353 | break; | 353 | break; |
354 | } | 354 | } |
355 | default: | 355 | default: |
@@ -376,6 +376,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) | |||
376 | client->fe_status = 0; | 376 | client->fe_status = 0; |
377 | sms_board_dvb3_event(client, DVB3_EVENT_FE_UNLOCK); | 377 | sms_board_dvb3_event(client, DVB3_EVENT_FE_UNLOCK); |
378 | } | 378 | } |
379 | complete(&client->stats_done); | ||
379 | } | 380 | } |
380 | 381 | ||
381 | return 0; | 382 | return 0; |
@@ -471,7 +472,7 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client) | |||
471 | sizeof(struct SmsMsgHdr_ST), 0 }; | 472 | sizeof(struct SmsMsgHdr_ST), 0 }; |
472 | 473 | ||
473 | rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), | 474 | rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), |
474 | &client->tune_done); | 475 | &client->stats_done); |
475 | 476 | ||
476 | return rc; | 477 | return rc; |
477 | } | 478 | } |
@@ -1002,6 +1003,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev, | |||
1002 | client->coredev = coredev; | 1003 | client->coredev = coredev; |
1003 | 1004 | ||
1004 | init_completion(&client->tune_done); | 1005 | init_completion(&client->tune_done); |
1006 | init_completion(&client->stats_done); | ||
1005 | 1007 | ||
1006 | kmutex_lock(&g_smsdvb_clientslock); | 1008 | kmutex_lock(&g_smsdvb_clientslock); |
1007 | 1009 | ||