From patchwork Mon Sep 24 11:26:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11666 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 ECB6523EB4 for ; Mon, 24 Sep 2012 11:30:04 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8DD86A18E72 for ; Mon, 24 Sep 2012 11:30:04 +0000 (UTC) Received: by ieje10 with SMTP id e10so9614010iej.11 for ; Mon, 24 Sep 2012 04:30:04 -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:x-gm-message-state; bh=vO7NZ28AXs/OMQwaIyIXmFjauAOK+IXM5TPKpwk+W88=; b=pH82qTOrVEWe07U/r77Hn20ikelqKHqUnILtdDjl7/1YQffIVJ/hgNbLfuU6vWJ3p7 19NaR1DJpZHVVm5gIQcb3HKl3jBxW/OS53W5BcrxXcyhCld0h81fJOqSv/r9yPhy25HU VbvbfWcSbH4z+I9Qy3b23QowB4fVDAOmHzLYnt/ds8vzSjor43V78RO1o/KiRfi6iW2I R36/c98T2aQccwGp+e8wW7Il7kNNpoyE2oo1Nb3J+h60i1X2HpzmdhCFlNk0vhxr2uXn Gy/yX/tqonhRz3J0QCntEqNITkvGz+61m0DkmHJXMSKwrKEOSr8IfcETJu2u6KzPwwVu 2pIQ== Received: by 10.42.109.194 with SMTP id m2mr9148152icp.48.1348486203877; Mon, 24 Sep 2012 04:30:03 -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 ex8csp238461igc; Mon, 24 Sep 2012 04:30:03 -0700 (PDT) Received: by 10.68.221.70 with SMTP id qc6mr36416287pbc.92.1348486202978; Mon, 24 Sep 2012 04:30:02 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id si9si19255348pbc.182.2012.09.24.04.30.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 04:30:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.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 pbcmd12 with SMTP id md12so13017265pbc.37 for ; Mon, 24 Sep 2012 04:30:02 -0700 (PDT) Received: by 10.68.237.38 with SMTP id uz6mr36479238pbc.23.1348486202506; Mon, 24 Sep 2012 04:30:02 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id gk5sm723831pbc.21.2012.09.24.04.29.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 04:30:01 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] [media] media-devnode: Replace printk with pr_* Date: Mon, 24 Sep 2012 16:56:24 +0530 Message-Id: <1348485984-22198-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlN9y8qZt/z5msCZHeBBUflU1tNxOVqM0yp/8X7kxSwjY48I7y2VFn6uwHgocRcZBefUnNa Fixes checkpatch warnings related to printk. Signed-off-by: Sachin Kamat Acked-by: Sakari Ailus Acked-by: Laurent Pinchart --- drivers/media/media-devnode.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index f6b52d5..023b2a1 100644 --- a/drivers/media/media-devnode.c +++ b/drivers/media/media-devnode.c @@ -30,6 +30,8 @@ * counting. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -215,7 +217,7 @@ int __must_check media_devnode_register(struct media_devnode *mdev) minor = find_next_zero_bit(media_devnode_nums, MEDIA_NUM_DEVICES, 0); if (minor == MEDIA_NUM_DEVICES) { mutex_unlock(&media_devnode_lock); - printk(KERN_ERR "could not get a free minor\n"); + pr_err("could not get a free minor\n"); return -ENFILE; } @@ -230,7 +232,7 @@ int __must_check media_devnode_register(struct media_devnode *mdev) ret = cdev_add(&mdev->cdev, MKDEV(MAJOR(media_dev_t), mdev->minor), 1); if (ret < 0) { - printk(KERN_ERR "%s: cdev_add failed\n", __func__); + pr_err("%s: cdev_add failed\n", __func__); goto error; } @@ -243,7 +245,7 @@ int __must_check media_devnode_register(struct media_devnode *mdev) dev_set_name(&mdev->dev, "media%d", mdev->minor); ret = device_register(&mdev->dev); if (ret < 0) { - printk(KERN_ERR "%s: device_register failed\n", __func__); + pr_err("%s: device_register failed\n", __func__); goto error; } @@ -287,18 +289,18 @@ static int __init media_devnode_init(void) { int ret; - printk(KERN_INFO "Linux media interface: v0.10\n"); + pr_info("Linux media interface: v0.10\n"); ret = alloc_chrdev_region(&media_dev_t, 0, MEDIA_NUM_DEVICES, MEDIA_NAME); if (ret < 0) { - printk(KERN_WARNING "media: unable to allocate major\n"); + pr_warn("unable to allocate major\n"); return ret; } ret = bus_register(&media_bus_type); if (ret < 0) { unregister_chrdev_region(media_dev_t, MEDIA_NUM_DEVICES); - printk(KERN_WARNING "media: bus_register failed\n"); + pr_warn("bus_register failed\n"); return -EIO; }