diff options
-rw-r--r-- | drivers/video/backlight/jornada720_bl.c | 14 | ||||
-rw-r--r-- | drivers/video/backlight/jornada720_lcd.c | 8 |
2 files changed, 13 insertions, 9 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 | } |
diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c index 22d231a17e3c..635b30523fd5 100644 --- a/drivers/video/backlight/jornada720_lcd.c +++ b/drivers/video/backlight/jornada720_lcd.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/device.h> | 14 | #include <linux/device.h> |
13 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
@@ -44,7 +46,7 @@ static int jornada_lcd_get_contrast(struct lcd_device *dev) | |||
44 | jornada_ssp_start(); | 46 | jornada_ssp_start(); |
45 | 47 | ||
46 | if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) { | 48 | if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) { |
47 | printk(KERN_ERR "lcd: get contrast failed\n"); | 49 | pr_err("get contrast failed\n"); |
48 | jornada_ssp_end(); | 50 | jornada_ssp_end(); |
49 | return -ETIMEDOUT; | 51 | return -ETIMEDOUT; |
50 | } else { | 52 | } else { |
@@ -65,7 +67,7 @@ static int jornada_lcd_set_contrast(struct lcd_device *dev, int value) | |||
65 | 67 | ||
66 | /* push the new value */ | 68 | /* push the new value */ |
67 | if (jornada_ssp_byte(value) != TXDUMMY) { | 69 | if (jornada_ssp_byte(value) != TXDUMMY) { |
68 | printk(KERN_ERR "lcd : set contrast failed\n"); | 70 | pr_err("set contrast failed\n"); |
69 | jornada_ssp_end(); | 71 | jornada_ssp_end(); |
70 | return -ETIMEDOUT; | 72 | return -ETIMEDOUT; |
71 | } | 73 | } |
@@ -103,7 +105,7 @@ static int jornada_lcd_probe(struct platform_device *pdev) | |||
103 | 105 | ||
104 | if (IS_ERR(lcd_device)) { | 106 | if (IS_ERR(lcd_device)) { |
105 | ret = PTR_ERR(lcd_device); | 107 | ret = PTR_ERR(lcd_device); |
106 | printk(KERN_ERR "lcd : failed to register device\n"); | 108 | pr_err("failed to register device\n"); |
107 | return ret; | 109 | return ret; |
108 | } | 110 | } |
109 | 111 | ||