lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH -next] scsi: ufs: ufs-mediatek: Fix build error
On Mon, Jul 4, 2022 at 4:56 AM Ren Zhijie <renzhijie2@huawei.com> wrote:
> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index c958279bdd8f..e006c2528a3a 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
> @@ -1427,6 +1427,7 @@ static int ufs_mtk_system_resume(struct device *dev)
> }
> #endif
>
> +#ifdef CONFIG_PM
> static int ufs_mtk_runtime_suspend(struct device *dev)
> {
> struct ufs_hba *hba = dev_get_drvdata(dev);
> @@ -1449,6 +1450,7 @@ 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,

This change works, but it's not great. It's better to change the
SET_SYSTEM_SLEEP_PM_OPS() to the new SYSTEM_SLEEP_PM_OPS()
that works without the #ifdef.

Arnd

\
 
 \ /
  Last update: 2022-07-12 10:28    [W:0.129 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site