mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
UPSTREAM: scsi: ufs: Fix build warning without CONFIG_PM
drivers/scsi/ufs/ufshcd.c:9770:12: warning: ‘ufshcd_rpmb_resume’ defined but not used [-Wunused-function]
static int ufshcd_rpmb_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9037:12: warning: ‘ufshcd_wl_runtime_resume’ defined but not used [-Wunused-function]
static int ufshcd_wl_runtime_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9017:12: warning: ‘ufshcd_wl_runtime_suspend’ defined but not used [-Wunused-function]
static int ufshcd_wl_runtime_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~~
Move it into #ifdef block to fix this.
Link: https://lore.kernel.org/r/20210617031326.36908-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 75d645a61c)
Bug: 204438323
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Change-Id: I3aa95339887bc0d6db1014ec8748668eed445152
This commit is contained in:
committed by
Bart Van Assche
parent
85cca5fada
commit
71b002bdae
@@ -8912,6 +8912,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
{
|
||||
int ret;
|
||||
@@ -9040,6 +9041,7 @@ static int ufshcd_wl_runtime_resume(struct device *dev)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int ufshcd_wl_suspend(struct device *dev)
|
||||
@@ -9756,6 +9758,7 @@ static inline int ufshcd_clear_rpmb_uac(struct ufs_hba *hba)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int ufshcd_rpmb_resume(struct device *dev)
|
||||
{
|
||||
struct ufs_hba *hba = wlun_dev_to_hba(dev);
|
||||
@@ -9764,6 +9767,7 @@ static int ufshcd_rpmb_resume(struct device *dev)
|
||||
ufshcd_clear_rpmb_uac(hba);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops ufs_rpmb_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(NULL, ufshcd_rpmb_resume, NULL)
|
||||
|
||||
Reference in New Issue
Block a user