Merge branches 'pm-core', 'pm-sleep' and 'acpi-pm'
* pm-core: driver core: Introduce device links reference counting PM / wakeirq: Add wakeup name to dedicated wake irqs * pm-sleep: PM / hibernate: Change message when writing to /sys/power/resume PM / hibernate: Make passing hibernate offsets more friendly PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle * acpi-pm: ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA ACPI / PM: Allow deeper wakeup power states with no _SxD nor _SxW ACPI / PM: Reduce LPI constraints logging noise ACPI / PM: Do not reconfigure GPEs for suspend-to-idle
This commit is contained in:
@@ -1053,7 +1053,7 @@ static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
lock_system_sleep();
|
||||
swsusp_resume_device = res;
|
||||
unlock_system_sleep();
|
||||
pr_info("Starting manual resume from disk\n");
|
||||
pm_pr_dbg("Configured resume from disk to %u\n", swsusp_resume_device);
|
||||
noresume = 0;
|
||||
software_resume();
|
||||
return n;
|
||||
@@ -1061,6 +1061,29 @@ static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
|
||||
power_attr(resume);
|
||||
|
||||
static ssize_t resume_offset_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%llu\n", (unsigned long long)swsusp_resume_block);
|
||||
}
|
||||
|
||||
static ssize_t resume_offset_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, const char *buf,
|
||||
size_t n)
|
||||
{
|
||||
unsigned long long offset;
|
||||
int rc;
|
||||
|
||||
rc = kstrtoull(buf, 0, &offset);
|
||||
if (rc)
|
||||
return rc;
|
||||
swsusp_resume_block = offset;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
power_attr(resume_offset);
|
||||
|
||||
static ssize_t image_size_show(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
@@ -1106,6 +1129,7 @@ power_attr(reserved_size);
|
||||
|
||||
static struct attribute * g[] = {
|
||||
&disk_attr.attr,
|
||||
&resume_offset_attr.attr,
|
||||
&resume_attr.attr,
|
||||
&image_size_attr.attr,
|
||||
&reserved_size_attr.attr,
|
||||
|
||||
Reference in New Issue
Block a user