From patchwork Mon Sep 10 10:54:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 11283 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 541AF23EFF for ; Mon, 10 Sep 2012 10:54:25 +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 BBF1CA188B4 for ; Mon, 10 Sep 2012 10:54:24 +0000 (UTC) Received: by ieak11 with SMTP id k11so2782361iea.11 for ; Mon, 10 Sep 2012 03:54:24 -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:x-auditid :from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language :x-brightmail-tracker:x-gm-message-state; bh=LLF+kpxBtrGOTLFg12HfaC7aEO2ThaJr7plhFavwYVk=; b=L988yIV5vNb74aqFgkDJXUS5rjy4l++vz9L7wmXhvR88WprDdKZkqXPuOkvCYyFMfk Xcpb4yEOgWQ3LuksHerInYiS1H0Cl1/7+7VJ3N021VJgTlqBhS/NIDK2SIfti/SzlJSJ e46wpTbDWFNgkl+4spS1pDvMr2jFD8sSHM0q3p+l5hIccR/lgT9x3PpGGh0mM4RoI6RS G5UsmUafW3QgsSAfAV99MP9X1ICuIe1fW8DDGjHre30BP4l5STl+uc76ZcxsmVgAMuZl rcdr7UDkLPZcDqY/kgnOl9rIvLmEA1rWZQqscFTmHuUNRxN3IPAvYNxMmNBXU0De51JG CF3Q== Received: by 10.50.242.3 with SMTP id wm3mr9741848igc.0.1347274464179; Mon, 10 Sep 2012 03:54:24 -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 ex8csp85369igc; Mon, 10 Sep 2012 03:54:23 -0700 (PDT) Received: by 10.66.75.74 with SMTP id a10mr21454947paw.46.1347274463261; Mon, 10 Sep 2012 03:54:23 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id qd8si19957118pbc.157.2012.09.10.03.54.22; Mon, 10 Sep 2012 03:54:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of jg1.han@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of jg1.han@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=jg1.han@samsung.com Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MA4009WFRM69AL0@mailout4.samsung.com>; Mon, 10 Sep 2012 19:54:21 +0900 (KST) X-AuditID: cbfee61b-b7f586d000007adc-7c-504dc6dd54c1 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 5B.14.31452.DD6CD405; Mon, 10 Sep 2012 19:54:21 +0900 (KST) Received: from DOJG1HAN02 ([12.23.119.56]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MA400FUTRMLR3B0@mmp1.samsung.com>; Mon, 10 Sep 2012 19:54:21 +0900 (KST) From: Jingoo Han To: 'Florian Tobias Schandinat' Cc: linux-fbdev@vger.kernel.org, 'Sachin Kamat' , patches@linaro.org, 'Jingoo Han' Subject: [PATCH 1/2] video: s3c2410: Use pr_* and dev_* instead of printk Date: Mon, 10 Sep 2012 19:54:21 +0900 Message-id: <002c01cd8f42$a2104080$e630c180$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac2PQqH4RzicM6nRS6u93tUHZFVOOQ== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsVy+t9jAd27x3wDDA5PU7CYcvgLi8XJP72M Dkwed67tYQtgjOKySUnNySxLLdK3S+DKWLjnDEvBUvGKDUuuMDUw3hfqYuTkkBAwkXh0/RI7 hC0mceHeerYuRi4OIYFFjBIdD44yQzi/GCU+LT7CDFLFJqAm8eXLYaAODg4RASuJTVs1QcLM As2MEnPXhYLYwgKeEideXWIFsVkEVCV6188Bs3kFbCW+z9vDDGELSvyYfI8FoldLYv3O40wQ trzE5jVvmUHGSwioSzz6qwsSFhHQk5h2pYMRokREYt+Ld4wTGAVmIZk0C8mkWUgmzULSsoCR ZRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcIg+k97BuKrB4hCjAAejEg9vh4lvgBBrYllx Ze4hRgkOZiUR3j97gUK8KYmVValF+fFFpTmpxYcYpTlYlMR5nc7ZBQgJpCeWpGanphakFsFk mTg4pRoY3QoagrvFP7m6y3l8CpH7ZpLUkvdZWNXljfHiK7emcARwfnsUvzCjTGrLjoOlFsfk W+q/LeS7UzZVItNQZeVbyYmCMjnLb/Vb93d4zNunPvv2ff65fhMiDwltZ98oFri3stRdteaQ y+r1CpHKXs/PlOk7fj3wcU17xnl1hccMaaFpv+cy3mhRYinOSDTUYi4qTgQAx4BEoE0CAAA= X-Gm-Message-State: ALoCoQkAr6mykEe1vRAOHYESVk+LouP2Zbrj1apsmXQzH4r1j26zYgKcNAP912Pp+1TjIvkBCgao From: Sachin Kamat printk calls are replaced by pr_* and dev_* calls to silence checkpatch warnings. Signed-off-by: Sachin Kamat Signed-off-by: Jingoo Han --- drivers/video/s3c2410fb.c | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 77f34c6..1aa37ea 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -11,6 +11,8 @@ * Driver based on skeletonfb.c, sa1100fb.c and others. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -48,7 +50,11 @@ static int debug = 1; static int debug; #endif -#define dprintk(msg...) if (debug) printk(KERN_DEBUG "s3c2410fb: " msg); +#define dprintk(msg...) \ +do { \ + if (debug) \ + pr_debug(msg); \ +} while (0) /* useful functions */ @@ -598,11 +604,11 @@ static int s3c2410fb_debug_store(struct device *dev, if (strnicmp(buf, "on", 2) == 0 || strnicmp(buf, "1", 1) == 0) { debug = 1; - printk(KERN_DEBUG "s3c2410fb: Debug On"); + dev_dbg(dev, "s3c2410fb: Debug On"); } else if (strnicmp(buf, "off", 3) == 0 || strnicmp(buf, "0", 1) == 0) { debug = 0; - printk(KERN_DEBUG "s3c2410fb: Debug Off"); + dev_dbg(dev, "s3c2410fb: Debug Off"); } else { return -EINVAL; } @@ -921,7 +927,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, info->clk = clk_get(NULL, "lcd"); if (IS_ERR(info->clk)) { - printk(KERN_ERR "failed to get lcd clock source\n"); + dev_err(&pdev->dev, "failed to get lcd clock source\n"); ret = PTR_ERR(info->clk); goto release_irq; } @@ -947,7 +953,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, /* Initialize video memory */ ret = s3c2410fb_map_video_memory(fbinfo); if (ret) { - printk(KERN_ERR "Failed to allocate video RAM: %d\n", ret); + dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret); ret = -ENOMEM; goto release_clock; } @@ -970,7 +976,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, ret = register_framebuffer(fbinfo); if (ret < 0) { - printk(KERN_ERR "Failed to register framebuffer device: %d\n", + dev_err(&pdev->dev, "Failed to register framebuffer device: %d\n", ret); goto free_cpufreq; } @@ -978,9 +984,9 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, /* create device files */ ret = device_create_file(&pdev->dev, &dev_attr_debug); if (ret) - printk(KERN_ERR "failed to add debug attribute\n"); + dev_err(&pdev->dev, "failed to add debug attribute\n"); - printk(KERN_INFO "fb%d: %s frame buffer device\n", + dev_info(&pdev->dev, "fb%d: %s frame buffer device\n", fbinfo->node, fbinfo->fix.id); return 0;