From patchwork Thu Aug 4 07:14:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1034032 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p747EaXZ002276 for ; Thu, 4 Aug 2011 07:14:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751264Ab1HDHOd (ORCPT ); Thu, 4 Aug 2011 03:14:33 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:49334 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658Ab1HDHOZ (ORCPT ); Thu, 4 Aug 2011 03:14:25 -0400 Received: from localhost (p548E06E4.dip0.t-ipconnect.de [84.142.6.228]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LvhpU-1RRUfE0pXo-017u4B; Thu, 04 Aug 2011 09:14:24 +0200 From: Thierry Reding To: linux-media@vger.kernel.org Subject: [PATCH 08/21] [staging] tm6000: Flesh out the IRQ callback. Date: Thu, 4 Aug 2011 09:14:06 +0200 Message-Id: <1312442059-23935-9-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> References: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:U9kuhzFPnDoLgMG1+QicoxpYgNLGyPyXqZJEOtydBK2 TdP9CCT/Hn0QROe2VzXEny7xjmG16lFR/9U0I/iXuFO+euCh0g orcFw26BZRqL2D8vB4ooW0eBUr6Bjllf4O8rpCO6uBgzL+vhYd BgpkW8asVkTOfqxiSS/4ewzKOmS1FdpNkrgosPJdxG3SZnvALA xiNJtiNjsZn/VxsiVx7eiUMhF72JMsFiGyclSDj2DM5A0piN3l klU+lzdXozfkV Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 04 Aug 2011 07:14:36 +0000 (UTC) This brings the IRQ callback implementation more in line with how other drivers do it. --- drivers/staging/tm6000/tm6000-video.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index e0cd512..4b50f6c 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -517,9 +517,21 @@ static void tm6000_irq_callback(struct urb *urb) struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); int i; - if (!dev) + switch (urb->status) { + case 0: + case -ETIMEDOUT: + break; + + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: return; + default: + tm6000_err("urb completion error %d.\n", urb->status); + break; + } + spin_lock(&dev->slock); tm6000_isoc_copy(urb); spin_unlock(&dev->slock);