From patchwork Thu Apr 18 17:13:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 2461901 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork2.kernel.org (Postfix) with ESMTP id ED48BDF2E5 for ; Thu, 18 Apr 2013 17:18:58 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3IHFALt025102; Thu, 18 Apr 2013 12:15:10 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3IHFAgD012250; Thu, 18 Apr 2013 12:15:10 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Thu, 18 Apr 2013 12:15:10 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3IHFA0C021581; Thu, 18 Apr 2013 12:15:10 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 793F780626; Thu, 18 Apr 2013 12:15:09 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id AC99A80627 for ; Thu, 18 Apr 2013 12:15:07 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id r3IHF76H013834 for ; Thu, 18 Apr 2013 12:15:07 -0500 (CDT) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3IHF7HS002172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Apr 2013 12:15:07 -0500 Received: from [216.82.250.99:44252] by server-10.bemta-12.messagelabs.com id CD/A0-19638-B1A20715; Thu, 18 Apr 2013 17:15:07 +0000 X-Env-Sender: wsa@the-dreams.de X-Msg-Ref: server-13.tower-126.messagelabs.com!1366305235!10475117!1 X-Originating-IP: [89.238.76.85] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6274 invoked from network); 18 Apr 2013 17:13:57 -0000 Received: from sauhun.de (HELO pokefinder.org) (89.238.76.85) by server-13.tower-126.messagelabs.com with AES256-SHA encrypted SMTP; 18 Apr 2013 17:13:57 -0000 Received: from dslc-082-082-090-243.pools.arcor-ip.net ([82.82.90.243]:39169 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1USsPC-00075j-Ad; Thu, 18 Apr 2013 19:13:54 +0200 From: Wolfram Sang To: Subject: [PATCH 3/3] i2c: designware-pci: drop superfluous {get|put}_device Date: Thu, 18 Apr 2013 19:13:38 +0200 Message-ID: <1366305218-22817-4-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366305218-22817-1-git-send-email-wsa@the-dreams.de> References: <1366305218-22817-1-git-send-email-wsa@the-dreams.de> CC: , Wolfram Sang , Viresh Kumar , Andy Shevchenko , Mika Westerberg X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Driver core already takes care of refcounting, no need to do this on driver level again. Signed-off-by: Wolfram Sang Tested-by: Mika Westerberg --- drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index c8797e2..f6ed06c 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -288,9 +288,6 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, return r; } - /* Increase reference counter */ - get_device(&pdev->dev); - pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_allow(&pdev->dev); @@ -307,7 +304,6 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev) pm_runtime_get_noresume(&pdev->dev); i2c_del_adapter(&dev->adapter); - put_device(&pdev->dev); } /* work with hotplug and coldplug */