aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/jornada720_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/jornada720_bl.c')
-rw-r--r--drivers/video/backlight/jornada720_bl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index 2f8af5d786ab..16f593b64427 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -9,6 +9,8 @@
9 * 9 *
10 */ 10 */
11 11
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
12#include <linux/backlight.h> 14#include <linux/backlight.h>
13#include <linux/device.h> 15#include <linux/device.h>
14#include <linux/fb.h> 16#include <linux/fb.h>
@@ -38,7 +40,7 @@ static int jornada_bl_get_brightness(struct backlight_device *bd)
38 ret = jornada_ssp_byte(GETBRIGHTNESS); 40 ret = jornada_ssp_byte(GETBRIGHTNESS);
39 41
40 if (jornada_ssp_byte(GETBRIGHTNESS) != TXDUMMY) { 42 if (jornada_ssp_byte(GETBRIGHTNESS) != TXDUMMY) {
41 printk(KERN_ERR "bl : get brightness timeout\n"); 43 pr_err("get brightness timeout\n");
42 jornada_ssp_end(); 44 jornada_ssp_end();
43 return -ETIMEDOUT; 45 return -ETIMEDOUT;
44 } else /* exchange txdummy for value */ 46 } else /* exchange txdummy for value */
@@ -59,7 +61,7 @@ static int jornada_bl_update_status(struct backlight_device *bd)
59 if ((bd->props.power != FB_BLANK_UNBLANK) || (bd->props.fb_blank != FB_BLANK_UNBLANK)) { 61 if ((bd->props.power != FB_BLANK_UNBLANK) || (bd->props.fb_blank != FB_BLANK_UNBLANK)) {
60 ret = jornada_ssp_byte(BRIGHTNESSOFF); 62 ret = jornada_ssp_byte(BRIGHTNESSOFF);
61 if (ret != TXDUMMY) { 63 if (ret != TXDUMMY) {
62 printk(KERN_INFO "bl : brightness off timeout\n"); 64 pr_info("brightness off timeout\n");
63 /* turn off backlight */ 65 /* turn off backlight */
64 PPSR &= ~PPC_LDD1; 66 PPSR &= ~PPC_LDD1;
65 PPDR |= PPC_LDD1; 67 PPDR |= PPC_LDD1;
@@ -70,7 +72,7 @@ static int jornada_bl_update_status(struct backlight_device *bd)
70 72
71 /* send command to our mcu */ 73 /* send command to our mcu */
72 if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) { 74 if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) {
73 printk(KERN_INFO "bl : failed to set brightness\n"); 75 pr_info("failed to set brightness\n");
74 ret = -ETIMEDOUT; 76 ret = -ETIMEDOUT;
75 goto out; 77 goto out;
76 } 78 }
@@ -81,7 +83,7 @@ static int jornada_bl_update_status(struct backlight_device *bd)
81 but due to physical layout it is equal to 0, so we simply 83 but due to physical layout it is equal to 0, so we simply
82 invert the value (MAX VALUE - NEW VALUE). */ 84 invert the value (MAX VALUE - NEW VALUE). */
83 if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) != TXDUMMY) { 85 if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) != TXDUMMY) {
84 printk(KERN_ERR "bl : set brightness failed\n"); 86 pr_err("set brightness failed\n");
85 ret = -ETIMEDOUT; 87 ret = -ETIMEDOUT;
86 } 88 }
87 89
@@ -113,7 +115,7 @@ static int jornada_bl_probe(struct platform_device *pdev)
113 115
114 if (IS_ERR(bd)) { 116 if (IS_ERR(bd)) {
115 ret = PTR_ERR(bd); 117 ret = PTR_ERR(bd);
116 printk(KERN_ERR "bl : failed to register device, err=%x\n", ret); 118 pr_err("failed to register device, err=%x\n", ret);
117 return ret; 119 return ret;
118 } 120 }
119 121
@@ -125,7 +127,7 @@ static int jornada_bl_probe(struct platform_device *pdev)
125 jornada_bl_update_status(bd); 127 jornada_bl_update_status(bd);
126 128
127 platform_set_drvdata(pdev, bd); 129 platform_set_drvdata(pdev, bd);
128 printk(KERN_INFO "HP Jornada 700 series backlight driver\n"); 130 pr_info("HP Jornada 700 series backlight driver\n");
129 131
130 return 0; 132 return 0;
131} 133}