From patchwork Wed Aug 22 10:18:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10869 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 424A023E1B for ; Wed, 22 Aug 2012 10:21:19 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id D0956A18D27 for ; Wed, 22 Aug 2012 10:21:07 +0000 (UTC) Received: by yhpp61 with SMTP id p61so531194yhp.11 for ; Wed, 22 Aug 2012 03:21:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=lnCGrEKIuwpHAwWfcKRWd7v3+XFfblfJ9OnRuEpg4T4=; b=TGTjoMdWf4j+myMvxZD/UIgnEPGFSdFTfXa9OA5R/ntGumrf3dn43yxpHTpltFinpm ha7j4t+p+jtOdZSC7mTSRFyTGQFgLxECzjuR6luPoWczB6GGPxihm+qJN5dh5fJUR7Ma ARQ+uFitS+fpF9QNnOkQevxpBsZNWwhPq6TUDqvO1KTfHr5NRM2UjlfrGYGJ0Z1cs9rN WNTrTdYzvkXczCP1xopQABLXRvJ53K3VoDMNtzrNbXtijzCxw1FWKt6wFEnBqqo5eAxM dZ2maz//h1gx7yqqdcwXWY8reE4nSlYKkWYtVzQQkMHPodbVS1/0moeLdGYX63Hs2pB6 WQ+w== Received: by 10.50.207.106 with SMTP id lv10mr1582173igc.0.1345630878062; Wed, 22 Aug 2012 03:21:18 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp194247igc; Wed, 22 Aug 2012 03:21:17 -0700 (PDT) Received: by 10.68.191.226 with SMTP id hb2mr51235133pbc.129.1345630877429; Wed, 22 Aug 2012 03:21:17 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id sb7si7332730pbc.151.2012.08.22.03.21.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 03:21:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pz0-f50.google.com with SMTP id e7so656040dad.37 for ; Wed, 22 Aug 2012 03:21:17 -0700 (PDT) Received: by 10.66.74.3 with SMTP id p3mr44990794pav.49.1345630877185; Wed, 22 Aug 2012 03:21:17 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id y11sm3421283pbv.66.2012.08.22.03.21.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 03:21:16 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: balbi@ti.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH v2 2/5] usb: gadget: s3c2410_udc: Use pr_* and dev_err functions Date: Wed, 22 Aug 2012 15:48:59 +0530 Message-Id: <1345630742-29908-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1345630742-29908-1-git-send-email-sachin.kamat@linaro.org> References: <1345630742-29908-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnyEPQuaBpfk/9GVK7sshSGF2S4+5F0torAGyYDLQhDSqDTF5bAIOgchNZcFIFadg+DBFWy Replace printk with corresponding pr_* and dev_err functions. Signed-off-by: Sachin Kamat --- 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 7acecc0..55a571e 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -12,6 +12,8 @@ * (at your option) any later version. */ +#define pr_fmt(fmt) "s3c2410_udc: " fmt + #include #include #include @@ -115,7 +117,7 @@ static int dprintk(int level, const char *fmt, ...) sizeof(printk_buf)-len, fmt, args); va_end(args); - return printk(KERN_DEBUG "%s", printk_buf); + return pr_debug("%s", printk_buf); } #else static int dprintk(int level, const char *fmt, ...) @@ -1683,13 +1685,13 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, return -EBUSY; if (!bind || !driver->setup || driver->max_speed < USB_SPEED_FULL) { - printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n", + dev_err(&udc->gadget.dev, "Invalid driver: bind %p setup %p speed %d\n", bind, driver->setup, driver->max_speed); return -EINVAL; } #if defined(MODULE) if (!driver->unbind) { - printk(KERN_ERR "Invalid driver: no unbind method\n"); + dev_err(&udc->gadget.dev, "Invalid driver: no unbind method\n"); return -EINVAL; } #endif @@ -1700,7 +1702,7 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, /* Bind the driver */ if ((retval = device_add(&udc->gadget.dev)) != 0) { - printk(KERN_ERR "Error in device_add() : %d\n",retval); + dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); goto register_error; } @@ -2073,7 +2075,7 @@ static int __init udc_init(void) s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL); if (IS_ERR(s3c2410_udc_debugfs_root)) { - printk(KERN_ERR "%s: debugfs dir creation failed %ld\n", + pr_err("%s: debugfs dir creation failed %ld\n", gadget_name, PTR_ERR(s3c2410_udc_debugfs_root)); s3c2410_udc_debugfs_root = NULL; }