usb: gadget: udc: core: Use pr_fmt() to prefix messages

Instead of duplicating, use pr_fmt() to prefix pr_*() messages.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211004144126.49154-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andy Shevchenko 2021-10-04 17:41:25 +03:00 committed by Greg Kroah-Hartman
parent 72ee48ee89
commit dab67a011d
1 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,8 @@
* Author: Felipe Balbi <balbi@ti.com> * Author: Felipe Balbi <balbi@ti.com>
*/ */
#define pr_fmt(fmt) "UDC core: " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/device.h> #include <linux/device.h>
@ -1555,14 +1557,14 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver)
if (!driver->match_existing_only) { if (!driver->match_existing_only) {
list_add_tail(&driver->pending, &gadget_driver_pending_list); list_add_tail(&driver->pending, &gadget_driver_pending_list);
pr_info("udc-core: couldn't find an available UDC - added [%s] to list of pending drivers\n", pr_info("couldn't find an available UDC - added [%s] to list of pending drivers\n",
driver->function); driver->function);
ret = 0; ret = 0;
} }
mutex_unlock(&udc_lock); mutex_unlock(&udc_lock);
if (ret) if (ret)
pr_warn("udc-core: couldn't find an available UDC or it's busy\n"); pr_warn("couldn't find an available UDC or it's busy\n");
return ret; return ret;
found: found:
ret = udc_bind_to_driver(udc, driver); ret = udc_bind_to_driver(udc, driver);