diff options
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r-- | drivers/acpi/fan.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 8acf53e62966..5328b1090e08 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -27,12 +27,10 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <asm/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/thermal.h> | 31 | #include <linux/thermal.h> |
32 | #include <linux/acpi.h> | 32 | #include <linux/acpi.h> |
33 | 33 | ||
34 | #define PREFIX "ACPI: " | ||
35 | |||
36 | #define ACPI_FAN_CLASS "fan" | 34 | #define ACPI_FAN_CLASS "fan" |
37 | #define ACPI_FAN_FILE_STATE "state" | 35 | #define ACPI_FAN_FILE_STATE "state" |
38 | 36 | ||
@@ -127,8 +125,9 @@ static const struct thermal_cooling_device_ops fan_cooling_ops = { | |||
127 | }; | 125 | }; |
128 | 126 | ||
129 | /* -------------------------------------------------------------------------- | 127 | /* -------------------------------------------------------------------------- |
130 | Driver Interface | 128 | * Driver Interface |
131 | -------------------------------------------------------------------------- */ | 129 | * -------------------------------------------------------------------------- |
130 | */ | ||
132 | 131 | ||
133 | static int acpi_fan_add(struct acpi_device *device) | 132 | static int acpi_fan_add(struct acpi_device *device) |
134 | { | 133 | { |
@@ -143,7 +142,7 @@ static int acpi_fan_add(struct acpi_device *device) | |||
143 | 142 | ||
144 | result = acpi_bus_update_power(device->handle, NULL); | 143 | result = acpi_bus_update_power(device->handle, NULL); |
145 | if (result) { | 144 | if (result) { |
146 | printk(KERN_ERR PREFIX "Setting initial power state\n"); | 145 | dev_err(&device->dev, "Setting initial power state\n"); |
147 | goto end; | 146 | goto end; |
148 | } | 147 | } |
149 | 148 | ||
@@ -168,10 +167,9 @@ static int acpi_fan_add(struct acpi_device *device) | |||
168 | &device->dev.kobj, | 167 | &device->dev.kobj, |
169 | "device"); | 168 | "device"); |
170 | if (result) | 169 | if (result) |
171 | dev_err(&device->dev, "Failed to create sysfs link " | 170 | dev_err(&device->dev, "Failed to create sysfs link 'device'\n"); |
172 | "'device'\n"); | ||
173 | 171 | ||
174 | printk(KERN_INFO PREFIX "%s [%s] (%s)\n", | 172 | dev_info(&device->dev, "ACPI: %s [%s] (%s)\n", |
175 | acpi_device_name(device), acpi_device_bid(device), | 173 | acpi_device_name(device), acpi_device_bid(device), |
176 | !device->power.state ? "on" : "off"); | 174 | !device->power.state ? "on" : "off"); |
177 | 175 | ||
@@ -217,7 +215,7 @@ static int acpi_fan_resume(struct device *dev) | |||
217 | 215 | ||
218 | result = acpi_bus_update_power(to_acpi_device(dev)->handle, NULL); | 216 | result = acpi_bus_update_power(to_acpi_device(dev)->handle, NULL); |
219 | if (result) | 217 | if (result) |
220 | printk(KERN_ERR PREFIX "Error updating fan power state\n"); | 218 | dev_err(dev, "Error updating fan power state\n"); |
221 | 219 | ||
222 | return result; | 220 | return result; |
223 | } | 221 | } |