]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/pm.c
uml: style fixes in arch/um/os-Linux
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / pm.c
index 3bf01e28df334ceaaf49dc55c8d4cd59e00c09d4..06b7e54a01280f8b92a33fe9cd66f8d3bd7fb492 100644 (file)
@@ -69,14 +69,14 @@ static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
 
 static unsigned short enable_dyn_sleep = 1;
 
-static ssize_t omap_pm_sleep_while_idle_show(struct kset *kset, char *buf)
+static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr,
+                        char *buf)
 {
        return sprintf(buf, "%hu\n", enable_dyn_sleep);
 }
 
-static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset,
-                                             const char * buf,
-                                             size_t n)
+static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr,
+                         const char * buf, size_t n)
 {
        unsigned short value;
        if (sscanf(buf, "%hu", &value) != 1 ||
@@ -88,16 +88,9 @@ static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset,
        return n;
 }
 
-static struct subsys_attribute sleep_while_idle_attr = {
-       .attr   = {
-               .name = __stringify(sleep_while_idle),
-               .mode = 0644,
-       },
-       .show   = omap_pm_sleep_while_idle_show,
-       .store  = omap_pm_sleep_while_idle_store,
-};
+static struct kobj_attribute sleep_while_idle_attr =
+       __ATTR(sleep_while_idle, 0644, idle_show, idle_store);
 
-extern struct kset power_subsys;
 static void (*omap_sram_idle)(void) = NULL;
 static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
 
@@ -646,7 +639,7 @@ static void omap_pm_finish(void)
 }
 
 
-static irqreturn_t  omap_wakeup_interrupt(int irq, void *dev)
+static irqreturn_t omap_wakeup_interrupt(int irq, void *dev)
 {
        return IRQ_HANDLED;
 }
@@ -726,9 +719,9 @@ static int __init omap_pm_init(void)
        omap_pm_init_proc();
 #endif
 
-       error = subsys_create_file(&power_subsys, &sleep_while_idle_attr);
+       error = sysfs_create_file(power_kobj, &sleep_while_idle_attr);
        if (error)
-               printk(KERN_ERR "subsys_create_file failed: %d\n", error);
+               printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
 
        if (cpu_is_omap16xx()) {
                /* configure LOW_PWR pin */