diff options
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index c538d0ef10ff..9f66181c814e 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -706,11 +706,23 @@ static void __exit interrupt_stats_exit(void) | |||
706 | return; | 706 | return; |
707 | } | 707 | } |
708 | 708 | ||
709 | static ssize_t | ||
710 | acpi_show_profile(struct device *dev, struct device_attribute *attr, | ||
711 | char *buf) | ||
712 | { | ||
713 | return sprintf(buf, "%d\n", acpi_gbl_FADT.preferred_profile); | ||
714 | } | ||
715 | |||
716 | static const struct device_attribute pm_profile_attr = | ||
717 | __ATTR(pm_profile, S_IRUGO, acpi_show_profile, NULL); | ||
718 | |||
709 | int __init acpi_sysfs_init(void) | 719 | int __init acpi_sysfs_init(void) |
710 | { | 720 | { |
711 | int result; | 721 | int result; |
712 | 722 | ||
713 | result = acpi_tables_sysfs_init(); | 723 | result = acpi_tables_sysfs_init(); |
714 | 724 | if (result) | |
725 | return result; | ||
726 | result = sysfs_create_file(acpi_kobj, &pm_profile_attr.attr); | ||
715 | return result; | 727 | return result; |
716 | } | 728 | } |