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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user