public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: fan.c: printk replacement
@ 2014-08-22 12:03 Sudip Mukherjee
  2014-08-25 22:45 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Sudip Mukherjee @ 2014-08-22 12:03 UTC (permalink / raw)
  To: Zhang Rui, Rafael J. Wysocki, Len Brown
  Cc: Sudip Mukherjee, linux-acpi, linux-kernel

printk replaced with corresponding dev_err and dev_info
fixed one broken user-visible string
multiine comment edited for correct commenting style
asm/uaccess.h replaced with linux/uaccess.h

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/acpi/fan.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 8acf53e..7900d55 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/thermal.h>
 #include <linux/acpi.h>
 
@@ -127,8 +127,9 @@ static const struct thermal_cooling_device_ops fan_cooling_ops = {
 };
 
 /* --------------------------------------------------------------------------
-                                 Driver Interface
-   -------------------------------------------------------------------------- */
+ *                               Driver Interface
+ * --------------------------------------------------------------------------
+*/
 
 static int acpi_fan_add(struct acpi_device *device)
 {
@@ -143,7 +144,7 @@ static int acpi_fan_add(struct acpi_device *device)
 
 	result = acpi_bus_update_power(device->handle, NULL);
 	if (result) {
-		printk(KERN_ERR PREFIX "Setting initial power state\n");
+		dev_err(&device->dev, PREFIX "Setting initial power state\n");
 		goto end;
 	}
 
@@ -168,10 +169,10 @@ static int acpi_fan_add(struct acpi_device *device)
 				   &device->dev.kobj,
 				   "device");
 	if (result)
-		dev_err(&device->dev, "Failed to create sysfs link "
-			"'device'\n");
+		dev_err(&device->dev,
+			"Failed to create sysfs link 'device'\n");
 
-	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
+	dev_info(&device->dev, PREFIX "%s [%s] (%s)\n",
 	       acpi_device_name(device), acpi_device_bid(device),
 	       !device->power.state ? "on" : "off");
 
@@ -214,10 +215,9 @@ static int acpi_fan_resume(struct device *dev)
 
 	if (!dev)
 		return -EINVAL;
-
 	result = acpi_bus_update_power(to_acpi_device(dev)->handle, NULL);
 	if (result)
-		printk(KERN_ERR PREFIX "Error updating fan power state\n");
+		dev_err(dev, PREFIX "Error updating fan power state\n");
 
 	return result;
 }
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-28 12:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 12:03 [PATCH] acpi: fan.c: printk replacement Sudip Mukherjee
2014-08-25 22:45 ` Rafael J. Wysocki
2014-08-26 15:30   ` Sudip Mukherjee
2014-08-26 21:02     ` Rafael J. Wysocki
2014-08-26 20:59       ` Joe Perches
2014-08-26 21:22         ` Rafael J. Wysocki
2014-08-27  4:57           ` Sudip Mukherjee
2014-08-27 23:26             ` Rafael J. Wysocki
2014-08-28 12:29               ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox