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: 1431671 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9BAD54025E for ; Mon, 10 Sep 2012 10:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757044Ab2IJKzK (ORCPT ); Mon, 10 Sep 2012 06:55:10 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:59791 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757028Ab2IJKzI (ORCPT ); Mon, 10 Sep 2012 06:55:08 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MA400AXGRLR9L90@mailout1.samsung.com> for linux-fbdev@vger.kernel.org; Mon, 10 Sep 2012 19:54:21 +0900 (KST) X-AuditID: cbfee61a-b7fba6d000007d5f-86-504dc6dd09fb Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D3.E7.32095.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> for linux-fbdev@vger.kernel.org; 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+NgFtrMLMWRmVeSWpSXmKPExsVy+t9jAd27x3wDDE5OU7A40feB1YHR4/Mm uQDGKC6blNSczLLUIn27BK6MhXvOsBQsFa/YsOQKUwPjfaEuRg4OCQETiXtXOboYOYFMMYkL 99azdTFycQgJLGKU2HblJpQzi0ni8rSdTCBVbAJqEl++HGYHaRYRsJLYtFUTJMws0MwoMXdd KIgtLOApceLVJVYQm0VAVaJ3/Rwwm1fAVuL7vD3MELagxI/J91ggerUk1u88zgRhy0tsXvOW GeI2dYlHf3VBwiICehLTrnQwQpSISOx78Y5xAqPALCSTZiGZNAvJpFlIWhYwsqxiFE0tSC4o TkrPNdQrTswtLs1L10vOz93ECA7KZ1I7GFc2WBxiFOBgVOLhfWjmGyDEmlhWXJl7iFGCg1lJ hPfPXqAQb0piZVVqUX58UWlOavEhRmkOFiVxXqdzdgFCAumJJanZqakFqUUwWSYOTqkGRolz 7zyuT7omtC7op7vilUsfD+9K/i72p6AjlmPz1I+v1YTtbbr3aSwP94veEbe4eV/MmYvnmvd7 Tfk235LJLeLR9bYtkTFGYoGO2rItTIXp/yoV99WG2+wOij62SV7Os/T3N/eW+nuXDxaJZ23z m9u261XhJ0G2U6o+S1ofhs0o+hH64PrkFUosxRmJhlrMRcWJABhH7YVGAgAA Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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;