aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-02 13:20:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:19 -0800
commit851324c6ffdf94976b4a925d0684a4faa993b9ca (patch)
tree8838773621269c65450aa8a7b0ae04efc7c6eb81 /arch/arm/mach-omap1
parent66ac831e03879c3c7dae76f793e6094e407081d2 (diff)
kobject: convert arm/mach-omap1/pm.c to kobj_attr interface
This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Cliff Brake <cbrake@accelent.com> Cc: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/pm.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 402113c7298..63edafb5949 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];
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,14 +88,8 @@ 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);
static void (*omap_sram_idle)(void) = NULL;
static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
@@ -725,9 +719,9 @@ static int __init omap_pm_init(void)
omap_pm_init_proc();
#endif
- error = subsys_create_file(power_kset, &sleep_while_idle_attr);
+ error = sysfs_create_file(&power_kset->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 */