The patch number 14078 was added via Douglas Schilling Landgraf 
<dougsl...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Stefan Richter  <stef...@s5r6.in-berlin.de>
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.

Priority: normal

Signed-off-by: Stefan Richter <stef...@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>
Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com>


---

 linux/drivers/media/dvb/firewire/firedtv-avc.c |   51 +++++------------
 1 file changed, 17 insertions(+), 34 deletions(-)

diff -r 810969b7f26e -r aafd83280ed8 
linux/drivers/media/dvb/firewire/firedtv-avc.c
--- a/linux/drivers/media/dvb/firewire/firedtv-avc.c    Mon Feb 01 15:12:07 
2010 -0200
+++ b/linux/drivers/media/dvb/firewire/firedtv-avc.c    Mon Feb 01 15:25:35 
2010 -0200
@@ -542,8 +542,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -584,8 +583,7 @@
        if (pidc > 16 && pidc != 0xff)
                return -EINVAL;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -629,8 +627,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret, sl;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -670,8 +667,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -712,8 +708,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int length, ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -795,8 +790,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int i, j, k, ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -844,8 +838,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -883,8 +876,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -943,8 +935,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int pos, ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -986,8 +977,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int pos, ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1028,8 +1018,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1073,8 +1062,7 @@
        if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT))
                debug_pmt(msg, length);
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1196,8 +1184,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1233,8 +1220,7 @@
        struct avc_command_frame *c = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1267,8 +1253,7 @@
        struct avc_response_frame *r = (void *)fdtv->avc_data;
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        memset(c, 0, sizeof(*c));
 
@@ -1306,8 +1291,7 @@
 {
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        ret = fdtv->backend->read(fdtv, addr, data);
        if (ret < 0)
@@ -1322,8 +1306,7 @@
 {
        int ret;
 
-       if (mutex_lock_interruptible(&fdtv->avc_mutex))
-               return -EINTR;
+       mutex_lock(&fdtv->avc_mutex);
 
        /* data[] is stack-allocated and should not be DMA-mapped. */
        memcpy(fdtv->avc_data, data, 8);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/aafd83280ed8ce2afe520182a3b8572ec115b529

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to