From patchwork Wed Sep 24 16:15:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 4968301 Return-Path: X-Original-To: patchwork-linux-arm@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 B00969F3DF for ; Wed, 24 Sep 2014 16:49:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D05CC20274 for ; Wed, 24 Sep 2014 16:49:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E7772026D for ; Wed, 24 Sep 2014 16:49:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XWpjC-0000i9-Io; Wed, 24 Sep 2014 16:47:42 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XWpjA-0000Zt-BZ for linux-arm-kernel@lists.infradead.org; Wed, 24 Sep 2014 16:47:40 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 24 Sep 2014 09:46:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,590,1406617200"; d="scan'208";a="604749384" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.96.11]) by fmsmga002.fm.intel.com with ESMTP; 24 Sep 2014 09:46:18 -0700 From: Vinod Koul To: linux-kernel@vger.kernel.org Subject: [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper Date: Wed, 24 Sep 2014 21:45:01 +0530 Message-Id: <1411575342-31048-12-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1411575342-31048-1-git-send-email-vinod.koul@intel.com> References: <1411575342-31048-1-git-send-email-vinod.koul@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140924_094740_463986_52C6BB5D X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: Samuel Ortiz , vinod.koul@intel.com, subhransu.s.prusty@intel.com, Linus Walleij , Lee Jones , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul Acked-by: Linus Walleij --- drivers/mfd/ab8500-gpadc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index 36000f9..46bea3a 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, } /* Disable VTVout LDO this is required for GPADC */ - pm_runtime_mark_last_busy(gpadc->dev); - pm_runtime_put_autosuspend(gpadc->dev); + pm_runtime_last_busy_and_autosuspend(gpadc->dev); mutex_unlock(&gpadc->ab8500_gpadc_lock); @@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev) if (ret) dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret); - pm_runtime_mark_last_busy(gpadc->dev); - pm_runtime_put_autosuspend(gpadc->dev); + pm_runtime_last_busy_and_autosuspend(gpadc->dev); mutex_unlock(&gpadc->ab8500_gpadc_lock); return ret;