From 495c8e7427258f381478c0c21162da9142f0e781 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Mon, 29 Nov 2010 08:14:08 +0100 Subject: [PATCH] --- yaml --- r: 227861 b: refs/heads/master c: 4e37b42d5ac0d3f505bcdc09028f3fde82031593 h: refs/heads/master i: 227859: 593228d8e189812d3cca2172c0989d3180d92e4f v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/eeepc-wmi.c | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index d2a3010aaa1c..a6c86f838171 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ba48fdb969d0404d54f6fa0266373afecbbd19d7 +refs/heads/master: 4e37b42d5ac0d3f505bcdc09028f3fde82031593 diff --git a/trunk/drivers/platform/x86/eeepc-wmi.c b/trunk/drivers/platform/x86/eeepc-wmi.c index fb548f4b03e0..a70d76a463a6 100644 --- a/trunk/drivers/platform/x86/eeepc-wmi.c +++ b/trunk/drivers/platform/x86/eeepc-wmi.c @@ -560,24 +560,23 @@ static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr, static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv); +static struct attribute *platform_attributes[] = { + &dev_attr_cpufv.attr, + NULL +}; + +static struct attribute_group platform_attribute_group = { + .attrs = platform_attributes +}; + static void eeepc_wmi_sysfs_exit(struct platform_device *device) { - device_remove_file(&device->dev, &dev_attr_cpufv); + sysfs_remove_group(&device->dev.kobj, &platform_attribute_group); } static int eeepc_wmi_sysfs_init(struct platform_device *device) { - int retval = -ENOMEM; - - retval = device_create_file(&device->dev, &dev_attr_cpufv); - if (retval) - goto error_sysfs; - - return 0; - -error_sysfs: - eeepc_wmi_sysfs_exit(device); - return retval; + return sysfs_create_group(&device->dev.kobj, &platform_attribute_group); } /*