From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C92D5D6ACFE for ; Thu, 18 Dec 2025 12:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4vsP/TD9Ic7Z0c4oCJZJKJxIrJKghN/1M0DqvMrT7NM=; b=NVB9WaDhxKOjal AwZtYNe8DnwIl4sEnjpOYtpyc+9Ai3mdhtFhBTy8a/FDue44zouapZkKIjKTJxXoe6pTK5R5qZbTm /5PwGerTjGeJ3QMmzZune4S7B+uNly0XZX1NqCY0m9Y2PUYQFRxEWudDmrciMw0cA1iRlcpQh0XOp zLaDK8ZpIALMLEMRLmH3KW66XsaVbm1sNPo5MhYGkrLiXVPNMe2SViNXH3bMX/fXsiBiZKcG5AbAc e6phqUeWzxwTXZJEDhmbhCz1jzOv5NeFPkxw3RzzLGyrV0lMzLashHb5mS/wJKmG9po1wTrJUgplh i7mPy4SXaoA8kmT9/xbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vWDZH-00000008Sx0-1MCR; Thu, 18 Dec 2025 12:57:19 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vWDZ9-00000008SnU-1kMd; Thu, 18 Dec 2025 12:57:17 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1766062622; cv=none; d=zohomail.com; s=zohoarc; b=mFZU0mXAEBTM1cj5jtcS3U/+8MRgphTsB4g1W/RRyTJxnMKpZFvwFh269eiNyN4EtPxFtFPxeT401R+Qagv6LoDDseIB0oTbLretXR6Ii7Dph9yMRB7OlvTOW7XHNMoAJwrAkFuXUA6pp+reZNGtk+DWpADLR+JR3nU/C8GBVC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1766062622; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=60JlsHuRXLbXd5Pexm7Q9dFe3pq5uxcyNe5DGlL9XFE=; b=D0LUVZ0b60JC37gCgz31oMGPxy8zqI4pkxFg3k12SjWcwFmXhFoLtIy8PJ2MH0UR9QKjf71l6OztqKneAP/UnCxF/hWF88b7iXkFetvLaudRhzhlcVspE/x6aL/WIjcT4MKTMsx8tOLKDnnrYfbnyw8dhzJVTHiYArVIlNvqVck= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1766062622; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=60JlsHuRXLbXd5Pexm7Q9dFe3pq5uxcyNe5DGlL9XFE=; b=AitEfXcuM7OO9SCx0cok6nieLMV/ptKscnMiXFPdP2jXdLgZYEZEZ+UPSUfGCtHn Jd0aboy/v619/6JkNPmglrcryoZp2GMWsIrS1wgSSmC+vVQweh5iP3cccLd26lzkjl4 gXaJ1kOqRrGaZpFZ5/xZDUhpjOPedETAa4q0XolE= Received: by mx.zohomail.com with SMTPS id 176606262047881.2669190579021; Thu, 18 Dec 2025 04:57:00 -0800 (PST) From: Nicolas Frattaroli Date: Thu, 18 Dec 2025 13:55:04 +0100 Subject: [PATCH v4 14/25] scsi: ufs: mediatek: Switch to newer PM ops helpers MIME-Version: 1.0 Message-Id: <20251218-mt8196-ufs-v4-14-ddec7a369dd2@collabora.com> References: <20251218-mt8196-ufs-v4-0-ddec7a369dd2@collabora.com> In-Reply-To: <20251218-mt8196-ufs-v4-0-ddec7a369dd2@collabora.com> To: Alim Akhtar , Avri Altman , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Peter Wang , Stanley Jhu , "James E.J. Bottomley" , "Martin K. Petersen" , Philipp Zabel , Liam Girdwood , Mark Brown , Chaotian Jing , Neil Armstrong Cc: Louis-Alexis Eyraud , kernel@collabora.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, Nicolas Frattaroli X-Mailer: b4 0.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251218_045711_532412_52CBCB35 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS are deprecated. Switch to the non-deprecated variants, and pm_ptr, removing the ifdeffery in the process. This allows the compiler visibility into those functions. Signed-off-by: Nicolas Frattaroli --- drivers/ufs/host/ufs-mediatek.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index b3fb87bd1c75..89e3fa5d7d10 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -2349,7 +2349,6 @@ static void ufs_mtk_remove(struct platform_device *pdev) ufshcd_pltfrm_remove(pdev); } -#ifdef CONFIG_PM_SLEEP static int ufs_mtk_system_suspend(struct device *dev) { struct ufs_hba *hba = dev_get_drvdata(dev); @@ -2396,9 +2395,7 @@ static int ufs_mtk_system_resume(struct device *dev) return ret; } -#endif -#ifdef CONFIG_PM static int ufs_mtk_runtime_suspend(struct device *dev) { struct ufs_hba *hba = dev_get_drvdata(dev); @@ -2442,13 +2439,10 @@ static int ufs_mtk_runtime_resume(struct device *dev) return ufshcd_runtime_resume(dev); } -#endif static const struct dev_pm_ops ufs_mtk_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(ufs_mtk_system_suspend, - ufs_mtk_system_resume) - SET_RUNTIME_PM_OPS(ufs_mtk_runtime_suspend, - ufs_mtk_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(ufs_mtk_system_suspend, ufs_mtk_system_resume) + RUNTIME_PM_OPS(ufs_mtk_runtime_suspend, ufs_mtk_runtime_resume, NULL) .prepare = ufshcd_suspend_prepare, .complete = ufshcd_resume_complete, }; @@ -2458,7 +2452,7 @@ static struct platform_driver ufs_mtk_pltform = { .remove = ufs_mtk_remove, .driver = { .name = "ufshcd-mtk", - .pm = &ufs_mtk_pm_ops, + .pm = pm_ptr(&ufs_mtk_pm_ops), .of_match_table = ufs_mtk_of_match, }, }; -- 2.52.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy