aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2006-12-07 07:56:19 -0500
committerLen Brown <len.brown@intel.com>2006-12-15 23:38:34 -0500
commit1d268b0a0f5407138caf0dec9559d68e657a3a74 (patch)
treeed752e55584d5caf803cfa440ba96a0d3f3fdbdb /drivers/acpi/scan.c
parent9e89dde2b063ca73fcdc9244fe68e2dea32c5088 (diff)
ACPI: rename some functions
We want the name 'to_acpi_device'. And the current macro 'to_acpi_device' will be removed after device model is setup. So just simply rename them. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index e0255cbd5e19..1f75ba6afae6 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -49,13 +49,13 @@ static void setup_sys_fs_device_files(struct acpi_device *dev,
49#define remove_sysfs_device_files(dev) \ 49#define remove_sysfs_device_files(dev) \
50 setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_remove_file) 50 setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_remove_file)
51 51
52#define to_acpi_device(n) container_of(n, struct acpi_device, kobj) 52#define to_acpi_dev(n) container_of(n, struct acpi_device, kobj)
53#define to_handle_attr(n) container_of(n, struct acpi_device_attribute, attr); 53#define to_handle_attr(n) container_of(n, struct acpi_device_attribute, attr);
54 54
55static ssize_t acpi_device_attr_show(struct kobject *kobj, 55static ssize_t acpi_device_attr_show(struct kobject *kobj,
56 struct attribute *attr, char *buf) 56 struct attribute *attr, char *buf)
57{ 57{
58 struct acpi_device *device = to_acpi_device(kobj); 58 struct acpi_device *device = to_acpi_dev(kobj);
59 struct acpi_device_attribute *attribute = to_handle_attr(attr); 59 struct acpi_device_attribute *attribute = to_handle_attr(attr);
60 return attribute->show ? attribute->show(device, buf) : -EIO; 60 return attribute->show ? attribute->show(device, buf) : -EIO;
61} 61}
@@ -63,7 +63,7 @@ static ssize_t acpi_device_attr_store(struct kobject *kobj,
63 struct attribute *attr, const char *buf, 63 struct attribute *attr, const char *buf,
64 size_t len) 64 size_t len)
65{ 65{
66 struct acpi_device *device = to_acpi_device(kobj); 66 struct acpi_device *device = to_acpi_dev(kobj);
67 struct acpi_device_attribute *attribute = to_handle_attr(attr); 67 struct acpi_device_attribute *attribute = to_handle_attr(attr);
68 return attribute->store ? attribute->store(device, buf, len) : -EIO; 68 return attribute->store ? attribute->store(device, buf, len) : -EIO;
69} 69}
@@ -82,7 +82,7 @@ static int namespace_uevent(struct kset *kset, struct kobject *kobj,
82 char **envp, int num_envp, char *buffer, 82 char **envp, int num_envp, char *buffer,
83 int buffer_size) 83 int buffer_size)
84{ 84{
85 struct acpi_device *dev = to_acpi_device(kobj); 85 struct acpi_device *dev = to_acpi_dev(kobj);
86 int i = 0; 86 int i = 0;
87 int len = 0; 87 int len = 0;
88 88
@@ -222,7 +222,7 @@ acpi_eject_store(struct acpi_device *device, const char *buf, size_t count)
222/* -------------------------------------------------------------------------- 222/* --------------------------------------------------------------------------
223 ACPI Bus operations 223 ACPI Bus operations
224 -------------------------------------------------------------------------- */ 224 -------------------------------------------------------------------------- */
225static inline struct acpi_device * to_acpi_dev(struct device * dev) 225static inline struct acpi_device * to_acpi_device(struct device * dev)
226{ 226{
227 return container_of(dev, struct acpi_device, dev); 227 return container_of(dev, struct acpi_device, dev);
228} 228}
@@ -251,7 +251,7 @@ static int root_suspend(struct acpi_device * acpi_dev, pm_message_t state)
251 251
252static int acpi_device_suspend(struct device * dev, pm_message_t state) 252static int acpi_device_suspend(struct device * dev, pm_message_t state)
253{ 253{
254 struct acpi_device * acpi_dev = to_acpi_dev(dev); 254 struct acpi_device * acpi_dev = to_acpi_device(dev);
255 255
256 /* 256 /*
257 * For now, we should only register 1 generic device - 257 * For now, we should only register 1 generic device -
@@ -288,7 +288,7 @@ static int root_resume(struct acpi_device * acpi_dev)
288 288
289static int acpi_device_resume(struct device * dev) 289static int acpi_device_resume(struct device * dev)
290{ 290{
291 struct acpi_device * acpi_dev = to_acpi_dev(dev); 291 struct acpi_device * acpi_dev = to_acpi_device(dev);
292 292
293 /* 293 /*
294 * For now, we should only register 1 generic device - 294 * For now, we should only register 1 generic device -