scsi: sata: move device_init_wakeup form ahci_platform.c to sd.c

The "struct device *dev" in sd_resume is for the hard disk, and
the correct device needs to be initialized for pm_stay_awake.

Fixes: da1c2c4a2c ("scsi: sata: re enter sleep is prohibited during wake-up")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ic6c4a340672605ac64fc0778f6938898dee1b8eb
This commit is contained in:
Yifeng Zhao
2022-05-16 11:34:56 +08:00
committed by Tao Huang
parent 2c8328c3f1
commit 2690864f78
2 changed files with 1 additions and 2 deletions
-2
View File
@@ -74,8 +74,6 @@ static int ahci_probe(struct platform_device *pdev)
if (rc)
goto disable_resources;
device_init_wakeup(dev, true);
return 0;
disable_resources:
ahci_platform_disable_resources(hpriv);
+1
View File
@@ -3453,6 +3453,7 @@ static int sd_probe(struct device *dev)
get_device(dev);
dev_set_drvdata(dev, sdkp);
device_init_wakeup(dev, true);
gd->major = sd_major((index & 0xf0) >> 4);
gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);