aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/pxafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r--drivers/video/pxafb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index cc59c52e1103..d6aa07b978ed 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -69,9 +69,6 @@
69#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\ 69#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\
70 LCCR3_PCD | LCCR3_BPP) 70 LCCR3_PCD | LCCR3_BPP)
71 71
72static void (*pxafb_backlight_power)(int);
73static void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
74
75static int pxafb_activate_var(struct fb_var_screeninfo *var, 72static int pxafb_activate_var(struct fb_var_screeninfo *var,
76 struct pxafb_info *); 73 struct pxafb_info *);
77static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); 74static void set_ctrlr_state(struct pxafb_info *fbi, u_int state);
@@ -814,6 +811,7 @@ static int pxafb_smart_init(struct pxafb_info *fbi)
814 __func__); 811 __func__);
815 return PTR_ERR(fbi->smart_thread); 812 return PTR_ERR(fbi->smart_thread);
816 } 813 }
814
817 return 0; 815 return 0;
818} 816}
819#else 817#else
@@ -976,16 +974,16 @@ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on)
976{ 974{
977 pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff"); 975 pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff");
978 976
979 if (pxafb_backlight_power) 977 if (fbi->backlight_power)
980 pxafb_backlight_power(on); 978 fbi->backlight_power(on);
981} 979}
982 980
983static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) 981static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
984{ 982{
985 pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff"); 983 pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff");
986 984
987 if (pxafb_lcd_power) 985 if (fbi->lcd_power)
988 pxafb_lcd_power(on, &fbi->fb.var); 986 fbi->lcd_power(on, &fbi->fb.var);
989} 987}
990 988
991static void pxafb_setup_gpio(struct pxafb_info *fbi) 989static void pxafb_setup_gpio(struct pxafb_info *fbi)
@@ -1748,8 +1746,7 @@ static int __devinit pxafb_probe(struct platform_device *dev)
1748 ret = -EINVAL; 1746 ret = -EINVAL;
1749 goto failed; 1747 goto failed;
1750 } 1748 }
1751 pxafb_backlight_power = inf->pxafb_backlight_power; 1749
1752 pxafb_lcd_power = inf->pxafb_lcd_power;
1753 fbi = pxafb_init_fbinfo(&dev->dev); 1750 fbi = pxafb_init_fbinfo(&dev->dev);
1754 if (!fbi) { 1751 if (!fbi) {
1755 /* only reason for pxafb_init_fbinfo to fail is kmalloc */ 1752 /* only reason for pxafb_init_fbinfo to fail is kmalloc */
@@ -1758,6 +1755,9 @@ static int __devinit pxafb_probe(struct platform_device *dev)
1758 goto failed; 1755 goto failed;
1759 } 1756 }
1760 1757
1758 fbi->backlight_power = inf->pxafb_backlight_power;
1759 fbi->lcd_power = inf->pxafb_lcd_power;
1760
1761 r = platform_get_resource(dev, IORESOURCE_MEM, 0); 1761 r = platform_get_resource(dev, IORESOURCE_MEM, 0);
1762 if (r == NULL) { 1762 if (r == NULL) {
1763 dev_err(&dev->dev, "no I/O memory resource defined\n"); 1763 dev_err(&dev->dev, "no I/O memory resource defined\n");