From patchwork Sun Jan 12 23:00:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3473421 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F360C9F2ED for ; Mon, 13 Jan 2014 02:04:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0ECDE20121 for ; Mon, 13 Jan 2014 02:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4237620103 for ; Mon, 13 Jan 2014 02:04:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbaAMCEc (ORCPT ); Sun, 12 Jan 2014 21:04:32 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:49543 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbaAMCE1 (ORCPT ); Sun, 12 Jan 2014 21:04:27 -0500 Received: from [177.143.150.208] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2Wt6-00052d-MP; Mon, 13 Jan 2014 02:04:25 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1W2U1S-0006zt-Gq; Sun, 12 Jan 2014 21:00:50 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 6/7] em28xx: print a message at disconnect Date: Sun, 12 Jan 2014 21:00:48 -0200 Message-Id: <1389567649-26838-7-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1389567649-26838-1-git-send-email-m.chehab@samsung.com> References: <1389567649-26838-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 That helps to identify if something fails and explain why em28xx struct is not freed (if it ever happens). Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-audio.c | 2 ++ drivers/media/usb/em28xx/em28xx-dvb.c | 2 ++ drivers/media/usb/em28xx/em28xx-input.c | 2 ++ drivers/media/usb/em28xx/em28xx-video.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index 5e16fcf18cac..0ec4742c3ab0 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -962,6 +962,8 @@ static int em28xx_audio_fini(struct em28xx *dev) return 0; } + em28xx_info("Disconnecting audio extension"); + snd_card_disconnect(dev->adev.sndcard); em28xx_audio_free_urb(dev); diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 8674ae5fce06..7ba209de57dd 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -1473,6 +1473,8 @@ static int em28xx_dvb_fini(struct em28xx *dev) return 0; } + em28xx_info("Disconnecting DVB extension"); + if (dev->dvb) { struct em28xx_dvb *dvb = dev->dvb; diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c index 33388b5922a0..bf04c5e1bd2a 100644 --- a/drivers/media/usb/em28xx/em28xx-input.c +++ b/drivers/media/usb/em28xx/em28xx-input.c @@ -812,6 +812,8 @@ static int em28xx_ir_fini(struct em28xx *dev) return 0; } + em28xx_info("Disconnecting input extension"); + em28xx_shutdown_buttons(dev); /* skip detach on non attached boards */ diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index dc10cec772ba..004fe12ceec7 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1894,6 +1894,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev) return 0; } + em28xx_info("Disconnecting video extension"); + v4l2_device_disconnect(&dev->v4l2_dev); em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);