From patchwork Fri Aug 31 11:49:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11130 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 6299F23E02 for ; Fri, 31 Aug 2012 11:52:28 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id BC79FA1801C for ; Fri, 31 Aug 2012 11:51:49 +0000 (UTC) Received: by iafj25 with SMTP id j25so4597447iaf.11 for ; Fri, 31 Aug 2012 04:52:27 -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=vGsKwXvwYQp4LvtqtCEPXgdXUJGqKY+2e2f7d4aT9hc=; b=hmliGCJBDbpb7d6yugLZxg6XFWcG6mKIJpxZRXh4uohOzG5cNcUOBmSpgZ6OlsH2nM mkyXvlKgwYqX+yu7moq10dxaTzirYhTGesTQT7ZA/j/9t4EyUUeNJvWjGBdYj9xa6aCB RYnXYEsiM0fxhzeErJNBJBctWuD17GcTPirt4/Optp73009MtRxPhM7zOushbDXu6TL4 O3R7WA2cGa//OPOd3Mtv/QbJCw7hIlwj8R+JKjc233oQRkcF3FrCeqOoO/zRPdA3x1Kk 73J/D1yfE3X9ZLClB3QAA4su8igy8u7U1LgYRvua9H1TRv0fron/oLamvieChGycUFJX aP9g== Received: by 10.50.207.106 with SMTP id lv10mr2410728igc.0.1346413947009; Fri, 31 Aug 2012 04:52:27 -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 ex8csp6976igc; Fri, 31 Aug 2012 04:52:26 -0700 (PDT) Received: by 10.68.237.34 with SMTP id uz2mr16970463pbc.71.1346413945907; Fri, 31 Aug 2012 04:52:25 -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 pn6si8246012pbb.250.2012.08.31.04.52.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 31 Aug 2012 04:52:25 -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 md12so5127782pbc.37 for ; Fri, 31 Aug 2012 04:52:25 -0700 (PDT) Received: by 10.68.138.135 with SMTP id qq7mr17298583pbb.167.1346413945060; Fri, 31 Aug 2012 04:52:25 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oc2sm3285602pbb.69.2012.08.31.04.52.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 31 Aug 2012 04:52:24 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: FlorianSchandinat@gmx.de, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] video: s3c2410fb: Use pr_* and dev_* instead of printk Date: Fri, 31 Aug 2012 17:19:50 +0530 Message-Id: <1346413790-13393-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmYkUr64eUyP6Z1sInAs6+tj7KdaFfJ74Ii/IfXoNEqJ099x4wMQkeURKXHB8ieGXehLFC1 printk calls are replaced by pr_* and dev_* calls to silence checkpatch warnings. Signed-off-by: Sachin Kamat --- drivers/video/s3c2410fb.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 77f34c6..a54e3f9 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) "s3c2410fb: " fmt + #include #include #include @@ -48,7 +50,7 @@ static int debug = 1; static int debug; #endif -#define dprintk(msg...) if (debug) printk(KERN_DEBUG "s3c2410fb: " msg); +#define dprintk(msg...) if (debug) pr_debug(msg); /* useful functions */ @@ -598,11 +600,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 +923,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 +949,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 +972,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 +980,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;