Skip to content

Commit

Permalink
hdaps: Convert printks to pr_<level>
Browse files Browse the repository at this point in the history
Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Joe Perches authored and Matthew Garrett committed May 27, 2011
1 parent 77bad7c commit 611f576
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions drivers/platform/x86/hdaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/input-polldev.h>
Expand Down Expand Up @@ -238,7 +240,7 @@ static int hdaps_device_init(void)
__check_latch(0x1611, 0x01))
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));

outb(0x17, 0x1610);
Expand Down Expand Up @@ -299,7 +301,7 @@ static int hdaps_probe(struct platform_device *dev)
if (ret)
return ret;

printk(KERN_INFO "hdaps: device successfully initialized.\n");
pr_info("device successfully initialized\n");
return 0;
}

Expand Down Expand Up @@ -480,16 +482,15 @@ static struct attribute_group hdaps_attribute_group = {
/* hdaps_dmi_match - found a match. return one, short-circuiting the hunt. */
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;
}

/* hdaps_dmi_match_invert - found an inverted match. */
static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
{
hdaps_invert = (unsigned long)id->driver_data;
printk(KERN_INFO "hdaps: inverting axis (%u) readings.\n",
hdaps_invert);
pr_info("inverting axis (%u) readings\n", hdaps_invert);
return hdaps_dmi_match(id);
}

Expand Down Expand Up @@ -543,7 +544,7 @@ static int __init hdaps_init(void)
int ret;

if (!dmi_check_system(hdaps_whitelist)) {
printk(KERN_WARNING "hdaps: supported laptop not found!\n");
pr_warn("supported laptop not found!\n");
ret = -ENODEV;
goto out;
}
Expand Down Expand Up @@ -595,7 +596,7 @@ static int __init hdaps_init(void)
if (ret)
goto out_idev;

printk(KERN_INFO "hdaps: driver successfully loaded.\n");
pr_info("driver successfully loaded\n");
return 0;

out_idev:
Expand All @@ -609,7 +610,7 @@ static int __init hdaps_init(void)
out_region:
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
out:
printk(KERN_WARNING "hdaps: driver init failed (ret=%d)!\n", ret);
pr_warn("driver init failed (ret=%d)!\n", ret);
return ret;
}

Expand All @@ -622,7 +623,7 @@ static void __exit hdaps_exit(void)
platform_driver_unregister(&hdaps_driver);
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);

printk(KERN_INFO "hdaps: driver unloaded.\n");
pr_info("driver unloaded\n");
}

module_init(hdaps_init);
Expand Down

0 comments on commit 611f576

Please sign in to comment.