mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
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>
This commit is contained in:
parent
a92cec2737
commit
8355d39cc2
@ -35,6 +35,9 @@
|
|||||||
* via an ELAN U132 adapter.
|
* via an ELAN U132 adapter.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@ -623,7 +626,7 @@ static int ftdi_elan_open(struct inode *inode, struct file *file)
|
|||||||
interface = usb_find_interface(&ftdi_elan_driver, subminor);
|
interface = usb_find_interface(&ftdi_elan_driver, subminor);
|
||||||
|
|
||||||
if (!interface) {
|
if (!interface) {
|
||||||
printk(KERN_ERR "can't find device for minor %d\n", subminor);
|
pr_err("can't find device for minor %d\n", subminor);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
} else {
|
} else {
|
||||||
struct usb_ftdi *ftdi = usb_get_intfdata(interface);
|
struct usb_ftdi *ftdi = usb_get_intfdata(interface);
|
||||||
@ -2722,10 +2725,8 @@ static int ftdi_elan_probe(struct usb_interface *interface,
|
|||||||
struct usb_ftdi *ftdi;
|
struct usb_ftdi *ftdi;
|
||||||
|
|
||||||
ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
|
ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
|
||||||
if (!ftdi) {
|
if (!ftdi)
|
||||||
printk(KERN_ERR "Out of memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
mutex_lock(&ftdi_module_lock);
|
mutex_lock(&ftdi_module_lock);
|
||||||
list_add_tail(&ftdi->ftdi_list, &ftdi_static_list);
|
list_add_tail(&ftdi->ftdi_list, &ftdi_static_list);
|
||||||
@ -2849,7 +2850,7 @@ static struct usb_driver ftdi_elan_driver = {
|
|||||||
static int __init ftdi_elan_init(void)
|
static int __init ftdi_elan_init(void)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
printk(KERN_INFO "driver %s\n", ftdi_elan_driver.name);
|
pr_info("driver %s\n", ftdi_elan_driver.name);
|
||||||
mutex_init(&ftdi_module_lock);
|
mutex_init(&ftdi_module_lock);
|
||||||
INIT_LIST_HEAD(&ftdi_static_list);
|
INIT_LIST_HEAD(&ftdi_static_list);
|
||||||
status_queue = create_singlethread_workqueue("ftdi-status-control");
|
status_queue = create_singlethread_workqueue("ftdi-status-control");
|
||||||
@ -2866,8 +2867,7 @@ static int __init ftdi_elan_init(void)
|
|||||||
destroy_workqueue(status_queue);
|
destroy_workqueue(status_queue);
|
||||||
destroy_workqueue(command_queue);
|
destroy_workqueue(command_queue);
|
||||||
destroy_workqueue(respond_queue);
|
destroy_workqueue(respond_queue);
|
||||||
printk(KERN_ERR "usb_register failed. Error number %d\n",
|
pr_err("usb_register failed. Error number %d\n", result);
|
||||||
result);
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
@ -2876,7 +2876,7 @@ err_respond_queue:
|
|||||||
err_command_queue:
|
err_command_queue:
|
||||||
destroy_workqueue(status_queue);
|
destroy_workqueue(status_queue);
|
||||||
err_status_queue:
|
err_status_queue:
|
||||||
printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name);
|
pr_err("%s couldn't create workqueue\n", ftdi_elan_driver.name);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2885,7 +2885,7 @@ static void __exit ftdi_elan_exit(void)
|
|||||||
struct usb_ftdi *ftdi;
|
struct usb_ftdi *ftdi;
|
||||||
struct usb_ftdi *temp;
|
struct usb_ftdi *temp;
|
||||||
usb_deregister(&ftdi_elan_driver);
|
usb_deregister(&ftdi_elan_driver);
|
||||||
printk(KERN_INFO "ftdi_u132 driver deregistered\n");
|
pr_info("ftdi_u132 driver deregistered\n");
|
||||||
list_for_each_entry_safe(ftdi, temp, &ftdi_static_list, ftdi_list) {
|
list_for_each_entry_safe(ftdi, temp, &ftdi_static_list, ftdi_list) {
|
||||||
ftdi_status_cancel_work(ftdi);
|
ftdi_status_cancel_work(ftdi);
|
||||||
ftdi_command_cancel_work(ftdi);
|
ftdi_command_cancel_work(ftdi);
|
||||||
|
Loading…
Reference in New Issue
Block a user