aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-11-18 14:03:03 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:48 -0500
commit6385c5bf98a9922917a563af3fdbd514888fa4ac (patch)
treefc00cac0301279f3db081fca9aae4c37d50dbadd /drivers
parent3fb80ef3bc0f2b1008e14f695dcb32415cbacc90 (diff)
V4L/DVB: firedtv: remove check for interrupting signal
FCP transactions as well as CMP transactions were serialized with mutex_lock_interruptible. It is extremely unlikly though that a signal will arrive while a concurrent process holds the mutex. And even if one does, the duration of a transaction is reasonably short (1.2 seconds if all retries time out, usually much shorter). Hence simplify the code to plain mutex_lock. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/firewire/firedtv-avc.c51
1 files changed, 17 insertions, 34 deletions
diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c
index 8f3105420756..e70642811217 100644
--- a/drivers/media/dvb/firewire/firedtv-avc.c
+++ b/drivers/media/dvb/firewire/firedtv-avc.c
@@ -542,8 +542,7 @@ int avc_tuner_dsd(struct firedtv *fdtv,
542 struct avc_command_frame *c = (void *)fdtv->avc_data; 542 struct avc_command_frame *c = (void *)fdtv->avc_data;
543 int ret; 543 int ret;
544 544
545 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 545 mutex_lock(&fdtv->avc_mutex);
546 return -EINTR;
547 546
548 memset(c, 0, sizeof(*c)); 547 memset(c, 0, sizeof(*c));
549 548
@@ -584,8 +583,7 @@ int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[])
584 if (pidc > 16 && pidc != 0xff) 583 if (pidc > 16 && pidc != 0xff)
585 return -EINVAL; 584 return -EINVAL;
586 585
587 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 586 mutex_lock(&fdtv->avc_mutex);
588 return -EINTR;
589 587
590 memset(c, 0, sizeof(*c)); 588 memset(c, 0, sizeof(*c));
591 589
@@ -629,8 +627,7 @@ int avc_tuner_get_ts(struct firedtv *fdtv)
629 struct avc_command_frame *c = (void *)fdtv->avc_data; 627 struct avc_command_frame *c = (void *)fdtv->avc_data;
630 int ret, sl; 628 int ret, sl;
631 629
632 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 630 mutex_lock(&fdtv->avc_mutex);
633 return -EINTR;
634 631
635 memset(c, 0, sizeof(*c)); 632 memset(c, 0, sizeof(*c));
636 633
@@ -670,8 +667,7 @@ int avc_identify_subunit(struct firedtv *fdtv)
670 struct avc_response_frame *r = (void *)fdtv->avc_data; 667 struct avc_response_frame *r = (void *)fdtv->avc_data;
671 int ret; 668 int ret;
672 669
673 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 670 mutex_lock(&fdtv->avc_mutex);
674 return -EINTR;
675 671
676 memset(c, 0, sizeof(*c)); 672 memset(c, 0, sizeof(*c));
677 673
@@ -712,8 +708,7 @@ int avc_tuner_status(struct firedtv *fdtv, struct firedtv_tuner_status *stat)
712 struct avc_response_frame *r = (void *)fdtv->avc_data; 708 struct avc_response_frame *r = (void *)fdtv->avc_data;
713 int length, ret; 709 int length, ret;
714 710
715 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 711 mutex_lock(&fdtv->avc_mutex);
716 return -EINTR;
717 712
718 memset(c, 0, sizeof(*c)); 713 memset(c, 0, sizeof(*c));
719 714
@@ -795,8 +790,7 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
795 struct avc_response_frame *r = (void *)fdtv->avc_data; 790 struct avc_response_frame *r = (void *)fdtv->avc_data;
796 int i, j, k, ret; 791 int i, j, k, ret;
797 792
798 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 793 mutex_lock(&fdtv->avc_mutex);
799 return -EINTR;
800 794
801 memset(c, 0, sizeof(*c)); 795 memset(c, 0, sizeof(*c));
802 796
@@ -844,8 +838,7 @@ int avc_register_remote_control(struct firedtv *fdtv)
844 struct avc_command_frame *c = (void *)fdtv->avc_data; 838 struct avc_command_frame *c = (void *)fdtv->avc_data;
845 int ret; 839 int ret;
846 840
847 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 841 mutex_lock(&fdtv->avc_mutex);
848 return -EINTR;
849 842
850 memset(c, 0, sizeof(*c)); 843 memset(c, 0, sizeof(*c));
851 844
@@ -883,8 +876,7 @@ int avc_tuner_host2ca(struct firedtv *fdtv)
883 struct avc_command_frame *c = (void *)fdtv->avc_data; 876 struct avc_command_frame *c = (void *)fdtv->avc_data;
884 int ret; 877 int ret;
885 878
886 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 879 mutex_lock(&fdtv->avc_mutex);
887 return -EINTR;
888 880
889 memset(c, 0, sizeof(*c)); 881 memset(c, 0, sizeof(*c));
890 882
@@ -943,8 +935,7 @@ int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
943 struct avc_response_frame *r = (void *)fdtv->avc_data; 935 struct avc_response_frame *r = (void *)fdtv->avc_data;
944 int pos, ret; 936 int pos, ret;
945 937
946 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 938 mutex_lock(&fdtv->avc_mutex);
947 return -EINTR;
948 939
949 memset(c, 0, sizeof(*c)); 940 memset(c, 0, sizeof(*c));
950 941
@@ -986,8 +977,7 @@ int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
986 struct avc_response_frame *r = (void *)fdtv->avc_data; 977 struct avc_response_frame *r = (void *)fdtv->avc_data;
987 int pos, ret; 978 int pos, ret;
988 979
989 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 980 mutex_lock(&fdtv->avc_mutex);
990 return -EINTR;
991 981
992 memset(c, 0, sizeof(*c)); 982 memset(c, 0, sizeof(*c));
993 983
@@ -1028,8 +1018,7 @@ int avc_ca_reset(struct firedtv *fdtv)
1028 struct avc_command_frame *c = (void *)fdtv->avc_data; 1018 struct avc_command_frame *c = (void *)fdtv->avc_data;
1029 int ret; 1019 int ret;
1030 1020
1031 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1021 mutex_lock(&fdtv->avc_mutex);
1032 return -EINTR;
1033 1022
1034 memset(c, 0, sizeof(*c)); 1023 memset(c, 0, sizeof(*c));
1035 1024
@@ -1073,8 +1062,7 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
1073 if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) 1062 if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT))
1074 debug_pmt(msg, length); 1063 debug_pmt(msg, length);
1075 1064
1076 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1065 mutex_lock(&fdtv->avc_mutex);
1077 return -EINTR;
1078 1066
1079 memset(c, 0, sizeof(*c)); 1067 memset(c, 0, sizeof(*c));
1080 1068
@@ -1196,8 +1184,7 @@ int avc_ca_get_time_date(struct firedtv *fdtv, int *interval)
1196 struct avc_response_frame *r = (void *)fdtv->avc_data; 1184 struct avc_response_frame *r = (void *)fdtv->avc_data;
1197 int ret; 1185 int ret;
1198 1186
1199 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1187 mutex_lock(&fdtv->avc_mutex);
1200 return -EINTR;
1201 1188
1202 memset(c, 0, sizeof(*c)); 1189 memset(c, 0, sizeof(*c));
1203 1190
@@ -1233,8 +1220,7 @@ int avc_ca_enter_menu(struct firedtv *fdtv)
1233 struct avc_command_frame *c = (void *)fdtv->avc_data; 1220 struct avc_command_frame *c = (void *)fdtv->avc_data;
1234 int ret; 1221 int ret;
1235 1222
1236 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1223 mutex_lock(&fdtv->avc_mutex);
1237 return -EINTR;
1238 1224
1239 memset(c, 0, sizeof(*c)); 1225 memset(c, 0, sizeof(*c));
1240 1226
@@ -1267,8 +1253,7 @@ int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len)
1267 struct avc_response_frame *r = (void *)fdtv->avc_data; 1253 struct avc_response_frame *r = (void *)fdtv->avc_data;
1268 int ret; 1254 int ret;
1269 1255
1270 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1256 mutex_lock(&fdtv->avc_mutex);
1271 return -EINTR;
1272 1257
1273 memset(c, 0, sizeof(*c)); 1258 memset(c, 0, sizeof(*c));
1274 1259
@@ -1306,8 +1291,7 @@ static int cmp_read(struct firedtv *fdtv, u64 addr, __be32 *data)
1306{ 1291{
1307 int ret; 1292 int ret;
1308 1293
1309 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1294 mutex_lock(&fdtv->avc_mutex);
1310 return -EINTR;
1311 1295
1312 ret = fdtv->backend->read(fdtv, addr, data); 1296 ret = fdtv->backend->read(fdtv, addr, data);
1313 if (ret < 0) 1297 if (ret < 0)
@@ -1322,8 +1306,7 @@ static int cmp_lock(struct firedtv *fdtv, u64 addr, __be32 data[])
1322{ 1306{
1323 int ret; 1307 int ret;
1324 1308
1325 if (mutex_lock_interruptible(&fdtv->avc_mutex)) 1309 mutex_lock(&fdtv->avc_mutex);
1326 return -EINTR;
1327 1310
1328 /* data[] is stack-allocated and should not be DMA-mapped. */ 1311 /* data[] is stack-allocated and should not be DMA-mapped. */
1329 memcpy(fdtv->avc_data, data, 8); 1312 memcpy(fdtv->avc_data, data, 8);