Commit 6385c5bf authored by Stefan Richter's avatar Stefan Richter Committed by Mauro Carvalho Chehab

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3fb80ef3
...@@ -542,8 +542,7 @@ int avc_tuner_dsd(struct firedtv *fdtv, ...@@ -542,8 +542,7 @@ int avc_tuner_dsd(struct firedtv *fdtv,
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -584,8 +583,7 @@ int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]) ...@@ -584,8 +583,7 @@ int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[])
if (pidc > 16 && pidc != 0xff) if (pidc > 16 && pidc != 0xff)
return -EINVAL; return -EINVAL;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -629,8 +627,7 @@ int avc_tuner_get_ts(struct firedtv *fdtv) ...@@ -629,8 +627,7 @@ int avc_tuner_get_ts(struct firedtv *fdtv)
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret, sl; int ret, sl;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -670,8 +667,7 @@ int avc_identify_subunit(struct firedtv *fdtv) ...@@ -670,8 +667,7 @@ int avc_identify_subunit(struct firedtv *fdtv)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -712,8 +708,7 @@ int avc_tuner_status(struct firedtv *fdtv, struct firedtv_tuner_status *stat) ...@@ -712,8 +708,7 @@ int avc_tuner_status(struct firedtv *fdtv, struct firedtv_tuner_status *stat)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int length, ret; int length, ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -795,8 +790,7 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, ...@@ -795,8 +790,7 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int i, j, k, ret; int i, j, k, ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -844,8 +838,7 @@ int avc_register_remote_control(struct firedtv *fdtv) ...@@ -844,8 +838,7 @@ int avc_register_remote_control(struct firedtv *fdtv)
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -883,8 +876,7 @@ int avc_tuner_host2ca(struct firedtv *fdtv) ...@@ -883,8 +876,7 @@ int avc_tuner_host2ca(struct firedtv *fdtv)
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -943,8 +935,7 @@ int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len) ...@@ -943,8 +935,7 @@ int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int pos, ret; int pos, ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -986,8 +977,7 @@ int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len) ...@@ -986,8 +977,7 @@ int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int pos, ret; int pos, ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1028,8 +1018,7 @@ int avc_ca_reset(struct firedtv *fdtv) ...@@ -1028,8 +1018,7 @@ int avc_ca_reset(struct firedtv *fdtv)
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1073,8 +1062,7 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) ...@@ -1073,8 +1062,7 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT))
debug_pmt(msg, length); debug_pmt(msg, length);
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1196,8 +1184,7 @@ int avc_ca_get_time_date(struct firedtv *fdtv, int *interval) ...@@ -1196,8 +1184,7 @@ int avc_ca_get_time_date(struct firedtv *fdtv, int *interval)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1233,8 +1220,7 @@ int avc_ca_enter_menu(struct firedtv *fdtv) ...@@ -1233,8 +1220,7 @@ int avc_ca_enter_menu(struct firedtv *fdtv)
struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_command_frame *c = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1267,8 +1253,7 @@ int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len) ...@@ -1267,8 +1253,7 @@ int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len)
struct avc_response_frame *r = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data;
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
...@@ -1306,8 +1291,7 @@ static int cmp_read(struct firedtv *fdtv, u64 addr, __be32 *data) ...@@ -1306,8 +1291,7 @@ static int cmp_read(struct firedtv *fdtv, u64 addr, __be32 *data)
{ {
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
ret = fdtv->backend->read(fdtv, addr, data); ret = fdtv->backend->read(fdtv, addr, data);
if (ret < 0) if (ret < 0)
...@@ -1322,8 +1306,7 @@ static int cmp_lock(struct firedtv *fdtv, u64 addr, __be32 data[]) ...@@ -1322,8 +1306,7 @@ static int cmp_lock(struct firedtv *fdtv, u64 addr, __be32 data[])
{ {
int ret; int ret;
if (mutex_lock_interruptible(&fdtv->avc_mutex)) mutex_lock(&fdtv->avc_mutex);
return -EINTR;
/* data[] is stack-allocated and should not be DMA-mapped. */ /* data[] is stack-allocated and should not be DMA-mapped. */
memcpy(fdtv->avc_data, data, 8); memcpy(fdtv->avc_data, data, 8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment