Commit 611f5763 authored by Joe Perches's avatar Joe Perches Committed by Matthew Garrett

hdaps: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 77bad7c8
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/input-polldev.h> #include <linux/input-polldev.h>
...@@ -238,7 +240,7 @@ static int hdaps_device_init(void) ...@@ -238,7 +240,7 @@ static int hdaps_device_init(void)
__check_latch(0x1611, 0x01)) __check_latch(0x1611, 0x01))
goto out; goto out;
printk(KERN_DEBUG "hdaps: initial latch check good (0x%02x).\n", printk(KERN_DEBUG "hdaps: initial latch check good (0x%02x)\n",
__get_latch(0x1611)); __get_latch(0x1611));
outb(0x17, 0x1610); outb(0x17, 0x1610);
...@@ -299,7 +301,7 @@ static int hdaps_probe(struct platform_device *dev) ...@@ -299,7 +301,7 @@ static int hdaps_probe(struct platform_device *dev)
if (ret) if (ret)
return ret; return ret;
printk(KERN_INFO "hdaps: device successfully initialized.\n"); pr_info("device successfully initialized\n");
return 0; return 0;
} }
...@@ -480,7 +482,7 @@ static struct attribute_group hdaps_attribute_group = { ...@@ -480,7 +482,7 @@ static struct attribute_group hdaps_attribute_group = {
/* hdaps_dmi_match - found a match. return one, short-circuiting the hunt. */ /* hdaps_dmi_match - found a match. return one, short-circuiting the hunt. */
static int __init hdaps_dmi_match(const struct dmi_system_id *id) static int __init hdaps_dmi_match(const struct dmi_system_id *id)
{ {
printk(KERN_INFO "hdaps: %s detected.\n", id->ident); pr_info("%s detected\n", id->ident);
return 1; return 1;
} }
...@@ -488,8 +490,7 @@ static int __init hdaps_dmi_match(const struct dmi_system_id *id) ...@@ -488,8 +490,7 @@ static int __init hdaps_dmi_match(const struct dmi_system_id *id)
static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id) static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
{ {
hdaps_invert = (unsigned long)id->driver_data; hdaps_invert = (unsigned long)id->driver_data;
printk(KERN_INFO "hdaps: inverting axis (%u) readings.\n", pr_info("inverting axis (%u) readings\n", hdaps_invert);
hdaps_invert);
return hdaps_dmi_match(id); return hdaps_dmi_match(id);
} }
...@@ -543,7 +544,7 @@ static int __init hdaps_init(void) ...@@ -543,7 +544,7 @@ static int __init hdaps_init(void)
int ret; int ret;
if (!dmi_check_system(hdaps_whitelist)) { if (!dmi_check_system(hdaps_whitelist)) {
printk(KERN_WARNING "hdaps: supported laptop not found!\n"); pr_warn("supported laptop not found!\n");
ret = -ENODEV; ret = -ENODEV;
goto out; goto out;
} }
...@@ -595,7 +596,7 @@ static int __init hdaps_init(void) ...@@ -595,7 +596,7 @@ static int __init hdaps_init(void)
if (ret) if (ret)
goto out_idev; goto out_idev;
printk(KERN_INFO "hdaps: driver successfully loaded.\n"); pr_info("driver successfully loaded\n");
return 0; return 0;
out_idev: out_idev:
...@@ -609,7 +610,7 @@ static int __init hdaps_init(void) ...@@ -609,7 +610,7 @@ static int __init hdaps_init(void)
out_region: out_region:
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
out: out:
printk(KERN_WARNING "hdaps: driver init failed (ret=%d)!\n", ret); pr_warn("driver init failed (ret=%d)!\n", ret);
return ret; return ret;
} }
...@@ -622,7 +623,7 @@ static void __exit hdaps_exit(void) ...@@ -622,7 +623,7 @@ static void __exit hdaps_exit(void)
platform_driver_unregister(&hdaps_driver); platform_driver_unregister(&hdaps_driver);
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
printk(KERN_INFO "hdaps: driver unloaded.\n"); pr_info("driver unloaded\n");
} }
module_init(hdaps_init); module_init(hdaps_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment