From patchwork Sun Jan 12 16:24:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Frank_Sch=C3=A4fer?= X-Patchwork-Id: 3472301 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57825C02DD for ; Sun, 12 Jan 2014 16:23:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97B5920127 for ; Sun, 12 Jan 2014 16:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1F9220122 for ; Sun, 12 Jan 2014 16:23:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbaALQXu (ORCPT ); Sun, 12 Jan 2014 11:23:50 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:44642 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbaALQXq (ORCPT ); Sun, 12 Jan 2014 11:23:46 -0500 Received: by mail-ee0-f41.google.com with SMTP id e49so1034523eek.0 for ; Sun, 12 Jan 2014 08:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=AHYci/f43+lEWDWtRLaKw2WKvnrmi9D1b+VOq8XtX78=; b=ruXtWlAQynSDn/0kRgmTXrl6zoH5nouzsOB+AhJJCMjTEV2mTPK3mZ4lXERCq4irnT BjqNCRLt4lIZ2fwk75E4e6HtfvenpC18Kd4mZd3yvnrLGaRxEmzt7yuL35s/d7pFTLse caQkHUEo8bZ6ta4oWeZDI/Fp8OiD8zTy3sf8EAc6SKXr+qjB1uUyWD/Pwbkx66ofFm+i /drhvC5lAMnebzVyh7Rx1+r/dU7dIdaU4hJtgjBtfItF5RAEtNCsmT2IA62FGZQC4Tvh UodS486QBxuze/6aEPO4M5WXjU+FH1MxeMlteXowhtoi9CTxfWZRyTecsfvb48+y0Vxu a/4w== X-Received: by 10.14.99.66 with SMTP id w42mr22155127eef.63.1389543825211; Sun, 12 Jan 2014 08:23:45 -0800 (PST) Received: from Athlon64X2-5000.site (ip-178-200-114-182.unitymediagroup.de. [178.200.114.182]) by mx.google.com with ESMTPSA id o47sm32222713eem.21.2014.01.12.08.23.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jan 2014 08:23:44 -0800 (PST) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: m.chehab@samsung.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [RFT/RFC PATCH 3/8] em28xx: move usb transfer uninit on device disconnect from the core to the v4l-extension Date: Sun, 12 Jan 2014 17:24:20 +0100 Message-Id: <1389543865-2534-4-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389543865-2534-1-git-send-email-fschaefer.oss@googlemail.com> References: <1389543865-2534-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-cards.c | 4 +--- drivers/media/usb/em28xx/em28xx-video.c | 2 ++ 2 Dateien geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 4d89df9..e0040f8 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -3342,12 +3342,10 @@ static void em28xx_usb_disconnect(struct usb_interface *interface) v4l2_device_disconnect(&dev->v4l2_dev); - if (dev->users) { + if (dev->users) em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n", video_device_node_name(dev->vdev)); - em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE); - } mutex_unlock(&dev->lock); em28xx_close_extension(dev); diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 83c99e6..634e88a 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1893,6 +1893,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev) return 0; } + em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE); + if (dev->radio_dev) { if (video_is_registered(dev->radio_dev)) video_unregister_device(dev->radio_dev);