#define remove_sysfs_device_files(dev) \
setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_remove_file)
-#define to_acpi_device(n) container_of(n, struct acpi_device, kobj)
+#define to_acpi_dev(n) container_of(n, struct acpi_device, kobj)
#define to_handle_attr(n) container_of(n, struct acpi_device_attribute, attr);
static ssize_t acpi_device_attr_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{
- struct acpi_device *device = to_acpi_device(kobj);
+ struct acpi_device *device = to_acpi_dev(kobj);
struct acpi_device_attribute *attribute = to_handle_attr(attr);
return attribute->show ? attribute->show(device, buf) : -EIO;
}
struct attribute *attr, const char *buf,
size_t len)
{
- struct acpi_device *device = to_acpi_device(kobj);
+ struct acpi_device *device = to_acpi_dev(kobj);
struct acpi_device_attribute *attribute = to_handle_attr(attr);
return attribute->store ? attribute->store(device, buf, len) : -EIO;
}
char **envp, int num_envp, char *buffer,
int buffer_size)
{
- struct acpi_device *dev = to_acpi_device(kobj);
+ struct acpi_device *dev = to_acpi_dev(kobj);
int i = 0;
int len = 0;
/* --------------------------------------------------------------------------
ACPI Bus operations
-------------------------------------------------------------------------- */
-static inline struct acpi_device * to_acpi_dev(struct device * dev)
+static inline struct acpi_device * to_acpi_device(struct device * dev)
{
return container_of(dev, struct acpi_device, dev);
}
static int acpi_device_suspend(struct device * dev, pm_message_t state)
{
- struct acpi_device * acpi_dev = to_acpi_dev(dev);
+ struct acpi_device * acpi_dev = to_acpi_device(dev);
/*
* For now, we should only register 1 generic device -
static int acpi_device_resume(struct device * dev)
{
- struct acpi_device * acpi_dev = to_acpi_dev(dev);
+ struct acpi_device * acpi_dev = to_acpi_device(dev);
/*
* For now, we should only register 1 generic device -