diff options
author | Joe Perches <joe@perches.com> | 2014-04-04 18:16:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-24 16:13:59 -0400 |
commit | 8355d39cc2128c80fd58309fdca825b1444bf067 (patch) | |
tree | d8ffee11aed1dc979bbd783cf1975359c33d4673 /drivers/usb/misc/ftdi-elan.c | |
parent | a92cec2737d16c458ec04836d1271a832b56a2e6 (diff) |
usb: ftdi-elan: Use pr_<level>
Use a more current logging style.
Add pr_fmt to prefix messages appropriately.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 10c54b36d26c..8ab1f8f3c26e 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -35,6 +35,9 @@ | |||
35 | * via an ELAN U132 adapter. | 35 | * via an ELAN U132 adapter. |
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | |||
39 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
40 | |||
38 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
39 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
40 | #include <linux/init.h> | 43 | #include <linux/init.h> |
@@ -623,7 +626,7 @@ static int ftdi_elan_open(struct inode *inode, struct file *file) | |||
623 | interface = usb_find_interface(&ftdi_elan_driver, subminor); | 626 | interface = usb_find_interface(&ftdi_elan_driver, subminor); |
624 | 627 | ||
625 | if (!interface) { | 628 | if (!interface) { |
626 | printk(KERN_ERR "can't find device for minor %d\n", subminor); | 629 | pr_err("can't find device for minor %d\n", subminor); |
627 | return -ENODEV; | 630 | return -ENODEV; |
628 | } else { | 631 | } else { |
629 | struct usb_ftdi *ftdi = usb_get_intfdata(interface); | 632 | struct usb_ftdi *ftdi = usb_get_intfdata(interface); |
@@ -2722,10 +2725,8 @@ static int ftdi_elan_probe(struct usb_interface *interface, | |||
2722 | struct usb_ftdi *ftdi; | 2725 | struct usb_ftdi *ftdi; |
2723 | 2726 | ||
2724 | ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL); | 2727 | ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL); |
2725 | if (!ftdi) { | 2728 | if (!ftdi) |
2726 | printk(KERN_ERR "Out of memory\n"); | ||
2727 | return -ENOMEM; | 2729 | return -ENOMEM; |
2728 | } | ||
2729 | 2730 | ||
2730 | mutex_lock(&ftdi_module_lock); | 2731 | mutex_lock(&ftdi_module_lock); |
2731 | list_add_tail(&ftdi->ftdi_list, &ftdi_static_list); | 2732 | list_add_tail(&ftdi->ftdi_list, &ftdi_static_list); |
@@ -2849,7 +2850,7 @@ static struct usb_driver ftdi_elan_driver = { | |||
2849 | static int __init ftdi_elan_init(void) | 2850 | static int __init ftdi_elan_init(void) |
2850 | { | 2851 | { |
2851 | int result; | 2852 | int result; |
2852 | printk(KERN_INFO "driver %s\n", ftdi_elan_driver.name); | 2853 | pr_info("driver %s\n", ftdi_elan_driver.name); |
2853 | mutex_init(&ftdi_module_lock); | 2854 | mutex_init(&ftdi_module_lock); |
2854 | INIT_LIST_HEAD(&ftdi_static_list); | 2855 | INIT_LIST_HEAD(&ftdi_static_list); |
2855 | status_queue = create_singlethread_workqueue("ftdi-status-control"); | 2856 | status_queue = create_singlethread_workqueue("ftdi-status-control"); |
@@ -2866,8 +2867,7 @@ static int __init ftdi_elan_init(void) | |||
2866 | destroy_workqueue(status_queue); | 2867 | destroy_workqueue(status_queue); |
2867 | destroy_workqueue(command_queue); | 2868 | destroy_workqueue(command_queue); |
2868 | destroy_workqueue(respond_queue); | 2869 | destroy_workqueue(respond_queue); |
2869 | printk(KERN_ERR "usb_register failed. Error number %d\n", | 2870 | pr_err("usb_register failed. Error number %d\n", result); |
2870 | result); | ||
2871 | } | 2871 | } |
2872 | return result; | 2872 | return result; |
2873 | 2873 | ||
@@ -2876,7 +2876,7 @@ err_respond_queue: | |||
2876 | err_command_queue: | 2876 | err_command_queue: |
2877 | destroy_workqueue(status_queue); | 2877 | destroy_workqueue(status_queue); |
2878 | err_status_queue: | 2878 | err_status_queue: |
2879 | printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name); | 2879 | pr_err("%s couldn't create workqueue\n", ftdi_elan_driver.name); |
2880 | return -ENOMEM; | 2880 | return -ENOMEM; |
2881 | } | 2881 | } |
2882 | 2882 | ||
@@ -2885,7 +2885,7 @@ static void __exit ftdi_elan_exit(void) | |||
2885 | struct usb_ftdi *ftdi; | 2885 | struct usb_ftdi *ftdi; |
2886 | struct usb_ftdi *temp; | 2886 | struct usb_ftdi *temp; |
2887 | usb_deregister(&ftdi_elan_driver); | 2887 | usb_deregister(&ftdi_elan_driver); |
2888 | printk(KERN_INFO "ftdi_u132 driver deregistered\n"); | 2888 | pr_info("ftdi_u132 driver deregistered\n"); |
2889 | list_for_each_entry_safe(ftdi, temp, &ftdi_static_list, ftdi_list) { | 2889 | list_for_each_entry_safe(ftdi, temp, &ftdi_static_list, ftdi_list) { |
2890 | ftdi_status_cancel_work(ftdi); | 2890 | ftdi_status_cancel_work(ftdi); |
2891 | ftdi_command_cancel_work(ftdi); | 2891 | ftdi_command_cancel_work(ftdi); |