You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a3a3395e48
commit
9480e307cd
@@ -774,31 +774,11 @@ static int __devinit vrc4171_card_setup(char *options)
|
||||
|
||||
__setup("vrc4171_card=", vrc4171_card_setup);
|
||||
|
||||
static int vrc4171_card_suspend(struct device *dev, pm_message_t state, u32 level)
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
if (level == SUSPEND_SAVE_STATE)
|
||||
retval = pcmcia_socket_dev_suspend(dev, state);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int vrc4171_card_resume(struct device *dev, u32 level)
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
if (level == RESUME_RESTORE_STATE)
|
||||
retval = pcmcia_socket_dev_resume(dev);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static struct device_driver vrc4171_card_driver = {
|
||||
.name = vrc4171_card_name,
|
||||
.bus = &platform_bus_type,
|
||||
.suspend = vrc4171_card_suspend,
|
||||
.resume = vrc4171_card_resume,
|
||||
.suspend = pcmcia_socket_dev_suspend,
|
||||
.resume = pcmcia_socket_dev_resume,
|
||||
};
|
||||
|
||||
static int __devinit vrc4171_card_init(void)
|
||||
|
||||
Reference in New Issue
Block a user