diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-08-22 06:18:59 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-31 05:41:48 -0400 |
commit | c2892cd4d9251d62419b731816633b9041fa7e3c (patch) | |
tree | 19d17ab180950a8087044e7a7eadc1382edb2b41 /drivers | |
parent | 2e8e25b882f8077c5fb38c111c0cb0fb079fb62d (diff) |
usb: gadget: s3c2410_udc: Use pr_* and dev_err functions
Replace printk with corresponding pr_* and dev_err functions.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/s3c2410_udc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index 7acecc0acf18..55a571e15cd2 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) "s3c2410_udc: " fmt | ||
16 | |||
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
@@ -115,7 +117,7 @@ static int dprintk(int level, const char *fmt, ...) | |||
115 | sizeof(printk_buf)-len, fmt, args); | 117 | sizeof(printk_buf)-len, fmt, args); |
116 | va_end(args); | 118 | va_end(args); |
117 | 119 | ||
118 | return printk(KERN_DEBUG "%s", printk_buf); | 120 | return pr_debug("%s", printk_buf); |
119 | } | 121 | } |
120 | #else | 122 | #else |
121 | static int dprintk(int level, const char *fmt, ...) | 123 | static int dprintk(int level, const char *fmt, ...) |
@@ -1683,13 +1685,13 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, | |||
1683 | return -EBUSY; | 1685 | return -EBUSY; |
1684 | 1686 | ||
1685 | if (!bind || !driver->setup || driver->max_speed < USB_SPEED_FULL) { | 1687 | if (!bind || !driver->setup || driver->max_speed < USB_SPEED_FULL) { |
1686 | printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n", | 1688 | dev_err(&udc->gadget.dev, "Invalid driver: bind %p setup %p speed %d\n", |
1687 | bind, driver->setup, driver->max_speed); | 1689 | bind, driver->setup, driver->max_speed); |
1688 | return -EINVAL; | 1690 | return -EINVAL; |
1689 | } | 1691 | } |
1690 | #if defined(MODULE) | 1692 | #if defined(MODULE) |
1691 | if (!driver->unbind) { | 1693 | if (!driver->unbind) { |
1692 | printk(KERN_ERR "Invalid driver: no unbind method\n"); | 1694 | dev_err(&udc->gadget.dev, "Invalid driver: no unbind method\n"); |
1693 | return -EINVAL; | 1695 | return -EINVAL; |
1694 | } | 1696 | } |
1695 | #endif | 1697 | #endif |
@@ -1700,7 +1702,7 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, | |||
1700 | 1702 | ||
1701 | /* Bind the driver */ | 1703 | /* Bind the driver */ |
1702 | if ((retval = device_add(&udc->gadget.dev)) != 0) { | 1704 | if ((retval = device_add(&udc->gadget.dev)) != 0) { |
1703 | printk(KERN_ERR "Error in device_add() : %d\n",retval); | 1705 | dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); |
1704 | goto register_error; | 1706 | goto register_error; |
1705 | } | 1707 | } |
1706 | 1708 | ||
@@ -2073,7 +2075,7 @@ static int __init udc_init(void) | |||
2073 | 2075 | ||
2074 | s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL); | 2076 | s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL); |
2075 | if (IS_ERR(s3c2410_udc_debugfs_root)) { | 2077 | if (IS_ERR(s3c2410_udc_debugfs_root)) { |
2076 | printk(KERN_ERR "%s: debugfs dir creation failed %ld\n", | 2078 | pr_err("%s: debugfs dir creation failed %ld\n", |
2077 | gadget_name, PTR_ERR(s3c2410_udc_debugfs_root)); | 2079 | gadget_name, PTR_ERR(s3c2410_udc_debugfs_root)); |
2078 | s3c2410_udc_debugfs_root = NULL; | 2080 | s3c2410_udc_debugfs_root = NULL; |
2079 | } | 2081 | } |