From patchwork Tue Apr 11 02:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keoseong Park X-Patchwork-Id: 13206963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A606C76196 for ; Tue, 11 Apr 2023 02:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbjDKCuR (ORCPT ); Mon, 10 Apr 2023 22:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjDKCuQ (ORCPT ); Mon, 10 Apr 2023 22:50:16 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9F91BC9 for ; Mon, 10 Apr 2023 19:50:13 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230411025008epoutp014628a5ce411f196c6bcdc492d1ccf957~UwZWHrQ0T1904619046epoutp01Y for ; Tue, 11 Apr 2023 02:50:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230411025008epoutp014628a5ce411f196c6bcdc492d1ccf957~UwZWHrQ0T1904619046epoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681181408; bh=bKN2lCoddiXVm6pUI8D2ej5iHDRTVAidYa5VCvdXMqQ=; h=Subject:Reply-To:From:To:Date:References:From; b=bYnFbVodglaL7wa1oQ90ZPafPbq8oFgofb+xotcqgvJ5oCoBHjGMx9W9lo+DGPIhR kQGfFyRc9tXwwN5aaxLn2VMmp4ZRJ/GCMj4xiv2bJ359+WRSobaeqoMaOBdNX3mC94 wfWjDZKJffXlP6/C9m0VU6qmqBe6qC/Wg5HfI4fg= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20230411025008epcas2p427ce51ee81e997761eac4c0af6a0f996~UwZVrCA8y0570805708epcas2p46; Tue, 11 Apr 2023 02:50:08 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.98]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4PwVgh0ZJwz4x9Pv; Tue, 11 Apr 2023 02:50:08 +0000 (GMT) X-AuditID: b6c32a48-dc7ff700000025b2-7c-6434cadf780f Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id FF.9B.09650.FDAC4346; Tue, 11 Apr 2023 11:50:07 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH] scsi: ufs: core: Use proper power management API Reply-To: keosung.park@samsung.com Sender: Keoseong Park From: Keoseong Park To: ALIM AKHTAR , "avri.altman@wdc.com" , "bvanassche@acm.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "beanhuo@micron.com" , Jinyoung CHOI , "peter.wang@mediatek.com" , "dlunev@chromium.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20230411025007epcms2p17ffdb87332484608daf446c7fde6ceac@epcms2p1> Date: Tue, 11 Apr 2023 11:50:07 +0900 X-CMS-MailID: 20230411025007epcms2p17ffdb87332484608daf446c7fde6ceac X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOJsWR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DoDpakefGLXkUem+f+tCurfPYpxes1ym2n00tf7Sn9aC21VDDE ZbvyhkNsHsEPHPU71WY8sbt6a2dkgLlSQur8279SOHy3H/PptLWVvCbcte3w53/8i1LZ7Dcf ly598P/aG7M15ypb+69qJtgEnT9dUfxaJ+l9/eW1W37/zDqs+tloq/LWCYkxJRqNdUosxRmJ hlrMRcWJACdJrStKBAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230411025007epcms2p17ffdb87332484608daf446c7fde6ceac References: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Commit b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun") modified the driver core to use ufshcd_rpm_{get,put}_sync() APIs. Switch to these APIs in sysfs as well. Signed-off-by: Keoseong Park --- drivers/ufs/core/ufs-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/core/ufs-sysfs.c b/drivers/ufs/core/ufs-sysfs.c index 883f0e44b54e..b683a43ea089 100644 --- a/drivers/ufs/core/ufs-sysfs.c +++ b/drivers/ufs/core/ufs-sysfs.c @@ -167,11 +167,11 @@ static ssize_t auto_hibern8_show(struct device *dev, goto out; } - pm_runtime_get_sync(hba->dev); + ufshcd_rpm_get_sync(hba); ufshcd_hold(hba, false); ahit = ufshcd_readl(hba, REG_AUTO_HIBERNATE_IDLE_TIMER); ufshcd_release(hba); - pm_runtime_put_sync(hba->dev); + ufshcd_rpm_put_sync(hba); ret = sysfs_emit(buf, "%d\n", ufshcd_ahit_to_us(ahit));