mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
UPSTREAM: scsi: ufs: core: Remove usfhcd_is_*_pm() macros
Remove these macros to make the UFS driver source code easier to read. These macros were introduced by commit57d104c153("ufs: add UFS power management support"). Link: https://lore.kernel.org/r/20210513171229.7439-1-bvanassche@acm.org Cc: Can Guo <cang@codeaurora.org> Cc: Alim Akhtar <alim.akhtar@samsung.com> Cc: Avri Altman <avri.altman@wdc.com> Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit4c6cb9ed63) Bug: 204438323 Change-Id: I6ad85279c2b6ebb82b60564f4d8d7f424845d677 Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
95017378d1
commit
bb16b6d0cd
@@ -400,7 +400,7 @@ static int ufs_hisi_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
{
|
||||
struct ufs_hisi_host *host = ufshcd_get_variant(hba);
|
||||
|
||||
if (ufshcd_is_runtime_pm(pm_op))
|
||||
if (pm_op == UFS_RUNTIME_PM)
|
||||
return 0;
|
||||
|
||||
if (host->in_suspend) {
|
||||
|
||||
@@ -8761,8 +8761,8 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
enum uic_link_state req_link_state;
|
||||
|
||||
hba->pm_op_in_progress = true;
|
||||
if (!ufshcd_is_shutdown_pm(pm_op)) {
|
||||
pm_lvl = ufshcd_is_runtime_pm(pm_op) ?
|
||||
if (pm_op != UFS_SHUTDOWN_PM) {
|
||||
pm_lvl = pm_op == UFS_RUNTIME_PM ?
|
||||
hba->rpm_lvl : hba->spm_lvl;
|
||||
req_dev_pwr_mode = ufs_get_pm_lvl_to_dev_pwr_mode(pm_lvl);
|
||||
req_link_state = ufs_get_pm_lvl_to_link_pwr_state(pm_lvl);
|
||||
@@ -8798,7 +8798,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
goto enable_scaling;
|
||||
}
|
||||
|
||||
if (ufshcd_is_runtime_pm(pm_op)) {
|
||||
if (pm_op == UFS_RUNTIME_PM) {
|
||||
if (ufshcd_can_autobkops_during_suspend(hba)) {
|
||||
/*
|
||||
* The device is idle with no requests in the queue,
|
||||
@@ -8828,7 +8828,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
flush_work(&hba->eeh_work);
|
||||
|
||||
if (req_dev_pwr_mode != hba->curr_dev_pwr_mode) {
|
||||
if (!ufshcd_is_runtime_pm(pm_op))
|
||||
if (pm_op != UFS_RUNTIME_PM)
|
||||
/* ensure that bkops is disabled */
|
||||
ufshcd_disable_auto_bkops(hba);
|
||||
|
||||
|
||||
@@ -109,10 +109,6 @@ enum ufs_pm_op {
|
||||
UFS_SHUTDOWN_PM,
|
||||
};
|
||||
|
||||
#define ufshcd_is_runtime_pm(op) ((op) == UFS_RUNTIME_PM)
|
||||
#define ufshcd_is_system_pm(op) ((op) == UFS_SYSTEM_PM)
|
||||
#define ufshcd_is_shutdown_pm(op) ((op) == UFS_SHUTDOWN_PM)
|
||||
|
||||
/* Host <-> Device UniPro Link state */
|
||||
enum uic_link_state {
|
||||
UIC_LINK_OFF_STATE = 0, /* Link powered down or disabled */
|
||||
|
||||
Reference in New Issue
Block a user