diff options
Diffstat (limited to 'arch/arm/mach-omap1/pm.c')
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 3bf01e28df33..06b7e54a0128 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -69,14 +69,14 @@ static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; | |||
69 | 69 | ||
70 | static unsigned short enable_dyn_sleep = 1; | 70 | static unsigned short enable_dyn_sleep = 1; |
71 | 71 | ||
72 | static ssize_t omap_pm_sleep_while_idle_show(struct kset *kset, char *buf) | 72 | static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr, |
73 | char *buf) | ||
73 | { | 74 | { |
74 | return sprintf(buf, "%hu\n", enable_dyn_sleep); | 75 | return sprintf(buf, "%hu\n", enable_dyn_sleep); |
75 | } | 76 | } |
76 | 77 | ||
77 | static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset, | 78 | static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr, |
78 | const char * buf, | 79 | const char * buf, size_t n) |
79 | size_t n) | ||
80 | { | 80 | { |
81 | unsigned short value; | 81 | unsigned short value; |
82 | if (sscanf(buf, "%hu", &value) != 1 || | 82 | if (sscanf(buf, "%hu", &value) != 1 || |
@@ -88,16 +88,9 @@ static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset, | |||
88 | return n; | 88 | return n; |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct subsys_attribute sleep_while_idle_attr = { | 91 | static struct kobj_attribute sleep_while_idle_attr = |
92 | .attr = { | 92 | __ATTR(sleep_while_idle, 0644, idle_show, idle_store); |
93 | .name = __stringify(sleep_while_idle), | ||
94 | .mode = 0644, | ||
95 | }, | ||
96 | .show = omap_pm_sleep_while_idle_show, | ||
97 | .store = omap_pm_sleep_while_idle_store, | ||
98 | }; | ||
99 | 93 | ||
100 | extern struct kset power_subsys; | ||
101 | static void (*omap_sram_idle)(void) = NULL; | 94 | static void (*omap_sram_idle)(void) = NULL; |
102 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; | 95 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; |
103 | 96 | ||
@@ -646,7 +639,7 @@ static void omap_pm_finish(void) | |||
646 | } | 639 | } |
647 | 640 | ||
648 | 641 | ||
649 | static irqreturn_t omap_wakeup_interrupt(int irq, void *dev) | 642 | static irqreturn_t omap_wakeup_interrupt(int irq, void *dev) |
650 | { | 643 | { |
651 | return IRQ_HANDLED; | 644 | return IRQ_HANDLED; |
652 | } | 645 | } |
@@ -726,9 +719,9 @@ static int __init omap_pm_init(void) | |||
726 | omap_pm_init_proc(); | 719 | omap_pm_init_proc(); |
727 | #endif | 720 | #endif |
728 | 721 | ||
729 | error = subsys_create_file(&power_subsys, &sleep_while_idle_attr); | 722 | error = sysfs_create_file(power_kobj, &sleep_while_idle_attr); |
730 | if (error) | 723 | if (error) |
731 | printk(KERN_ERR "subsys_create_file failed: %d\n", error); | 724 | printk(KERN_ERR "sysfs_create_file failed: %d\n", error); |
732 | 725 | ||
733 | if (cpu_is_omap16xx()) { | 726 | if (cpu_is_omap16xx()) { |
734 | /* configure LOW_PWR pin */ | 727 | /* configure LOW_PWR pin */ |