From patchwork Sun Jan 12 16:24:23 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: 3472321 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 66F8C9F2ED for ; Sun, 12 Jan 2014 16:23:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98D5B20121 for ; Sun, 12 Jan 2014 16:23:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDFFF20123 for ; Sun, 12 Jan 2014 16:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751213AbaALQXy (ORCPT ); Sun, 12 Jan 2014 11:23:54 -0500 Received: from mail-ea0-f174.google.com ([209.85.215.174]:44249 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbaALQXu (ORCPT ); Sun, 12 Jan 2014 11:23:50 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so2881909eae.33 for ; Sun, 12 Jan 2014 08:23:49 -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=57yah32UDROR6tOjHxkm9IrP/2FUzZTNwgfEI8eexoU=; b=DRKCc9xQqzkUr0/FBaKRXvC4rTmeq80RxQprqH2BBXmQMDprW61bphovhe40VvU6pr VDUOa+h5qQwpaLwG8PRjmjT87CCfs5uzdgHCBmnjx0bGX6WvSQ78BYFT8nxZhGmjV6XM UFESjLDlpl7MHlnByqeQgdqb9WDE67qQge+WXILXhFIjvkzuPzMYNk3HxZOr3OfuaEMU QJJCjwkc5sH59F/dWnShI3mJKBWGFoBs1T7hP7S7bMpO6ABibgbtaS/TK+6LV2+6/tIK xRNfCoQRfXMKiYXmJryLqaEx59isxWyoUIJ7D2xxMZiT+5l7ky9mJKnciiHoa+xxORwG Upxw== X-Received: by 10.15.45.135 with SMTP id b7mr22631341eew.88.1389543829174; Sun, 12 Jan 2014 08:23:49 -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.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jan 2014 08:23:48 -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 6/8] em28xx: move v4l2 dummy clock deregistration from the core to the v4l extension Date: Sun, 12 Jan 2014 17:24:23 +0100 Message-Id: <1389543865-2534-7-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 | 3 --- drivers/media/usb/em28xx/em28xx-video.c | 6 ++++++ 2 Dateien geändert, 6 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 34ff918b..cc7677a 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "em28xx.h" @@ -2831,8 +2830,6 @@ void em28xx_release_resources(struct em28xx *dev) if (dev->def_i2c_bus) em28xx_i2c_unregister(dev, 1); em28xx_i2c_unregister(dev, 0); - if (dev->clk) - v4l2_clk_unregister_fixed(dev->clk); usb_put_dev(dev->udev); diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 3ac8700..f209f95 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -1926,6 +1927,11 @@ static int em28xx_v4l2_fini(struct em28xx *dev) v4l2_ctrl_handler_free(&dev->ctrl_handler); v4l2_device_unregister(&dev->v4l2_dev); + if (dev->clk) { + v4l2_clk_unregister_fixed(dev->clk); + dev->clk = NULL; + } + if (dev->users) em28xx_warn("Device is open ! Memory deallocation is deferred on last close.\n");