diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-09-10 06:54:21 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-09-22 17:37:56 -0400 |
commit | 81c1655811e941af24c212c0ac5c27931f91af3b (patch) | |
tree | fc1c2dada0aeb0a2e6b287f459fb68700625b6d6 /drivers/video/s3c2410fb.c | |
parent | b5d4190f7ec584a2860499f2721fd3421e41c187 (diff) |
video: s3c2410: Use pr_* and dev_* instead of printk
printk calls are replaced by pr_* and dev_* calls to silence
checkpatch warnings.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/s3c2410fb.c')
-rw-r--r-- | 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 77f34c614c86..1aa37eab21e2 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * Driver based on skeletonfb.c, sa1100fb.c and others. | 11 | * Driver based on skeletonfb.c, sa1100fb.c and others. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
15 | |||
14 | #include <linux/module.h> | 16 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
16 | #include <linux/err.h> | 18 | #include <linux/err.h> |
@@ -48,7 +50,11 @@ static int debug = 1; | |||
48 | static int debug; | 50 | static int debug; |
49 | #endif | 51 | #endif |
50 | 52 | ||
51 | #define dprintk(msg...) if (debug) printk(KERN_DEBUG "s3c2410fb: " msg); | 53 | #define dprintk(msg...) \ |
54 | do { \ | ||
55 | if (debug) \ | ||
56 | pr_debug(msg); \ | ||
57 | } while (0) | ||
52 | 58 | ||
53 | /* useful functions */ | 59 | /* useful functions */ |
54 | 60 | ||
@@ -598,11 +604,11 @@ static int s3c2410fb_debug_store(struct device *dev, | |||
598 | if (strnicmp(buf, "on", 2) == 0 || | 604 | if (strnicmp(buf, "on", 2) == 0 || |
599 | strnicmp(buf, "1", 1) == 0) { | 605 | strnicmp(buf, "1", 1) == 0) { |
600 | debug = 1; | 606 | debug = 1; |
601 | printk(KERN_DEBUG "s3c2410fb: Debug On"); | 607 | dev_dbg(dev, "s3c2410fb: Debug On"); |
602 | } else if (strnicmp(buf, "off", 3) == 0 || | 608 | } else if (strnicmp(buf, "off", 3) == 0 || |
603 | strnicmp(buf, "0", 1) == 0) { | 609 | strnicmp(buf, "0", 1) == 0) { |
604 | debug = 0; | 610 | debug = 0; |
605 | printk(KERN_DEBUG "s3c2410fb: Debug Off"); | 611 | dev_dbg(dev, "s3c2410fb: Debug Off"); |
606 | } else { | 612 | } else { |
607 | return -EINVAL; | 613 | return -EINVAL; |
608 | } | 614 | } |
@@ -921,7 +927,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
921 | 927 | ||
922 | info->clk = clk_get(NULL, "lcd"); | 928 | info->clk = clk_get(NULL, "lcd"); |
923 | if (IS_ERR(info->clk)) { | 929 | if (IS_ERR(info->clk)) { |
924 | printk(KERN_ERR "failed to get lcd clock source\n"); | 930 | dev_err(&pdev->dev, "failed to get lcd clock source\n"); |
925 | ret = PTR_ERR(info->clk); | 931 | ret = PTR_ERR(info->clk); |
926 | goto release_irq; | 932 | goto release_irq; |
927 | } | 933 | } |
@@ -947,7 +953,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
947 | /* Initialize video memory */ | 953 | /* Initialize video memory */ |
948 | ret = s3c2410fb_map_video_memory(fbinfo); | 954 | ret = s3c2410fb_map_video_memory(fbinfo); |
949 | if (ret) { | 955 | if (ret) { |
950 | printk(KERN_ERR "Failed to allocate video RAM: %d\n", ret); | 956 | dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret); |
951 | ret = -ENOMEM; | 957 | ret = -ENOMEM; |
952 | goto release_clock; | 958 | goto release_clock; |
953 | } | 959 | } |
@@ -970,7 +976,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
970 | 976 | ||
971 | ret = register_framebuffer(fbinfo); | 977 | ret = register_framebuffer(fbinfo); |
972 | if (ret < 0) { | 978 | if (ret < 0) { |
973 | printk(KERN_ERR "Failed to register framebuffer device: %d\n", | 979 | dev_err(&pdev->dev, "Failed to register framebuffer device: %d\n", |
974 | ret); | 980 | ret); |
975 | goto free_cpufreq; | 981 | goto free_cpufreq; |
976 | } | 982 | } |
@@ -978,9 +984,9 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
978 | /* create device files */ | 984 | /* create device files */ |
979 | ret = device_create_file(&pdev->dev, &dev_attr_debug); | 985 | ret = device_create_file(&pdev->dev, &dev_attr_debug); |
980 | if (ret) | 986 | if (ret) |
981 | printk(KERN_ERR "failed to add debug attribute\n"); | 987 | dev_err(&pdev->dev, "failed to add debug attribute\n"); |
982 | 988 | ||
983 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 989 | dev_info(&pdev->dev, "fb%d: %s frame buffer device\n", |
984 | fbinfo->node, fbinfo->fix.id); | 990 | fbinfo->node, fbinfo->fix.id); |
985 | 991 | ||
986 | return 0; | 992 | return 0; |