Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123674
b: refs/heads/master
c: a5718a1
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao committed Dec 2, 2008
1 parent 6649359 commit 9179ff2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9179825cf5e96bd0784456ef43811cab4db17cd9
refs/heads/master: a5718a14a1d91b871e65d4e6b349e39c22cac943
18 changes: 9 additions & 9 deletions trunk/drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\
LCCR3_PCD | LCCR3_BPP)

static void (*pxafb_backlight_power)(int);
static void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);

static int pxafb_activate_var(struct fb_var_screeninfo *var,
struct pxafb_info *);
static void set_ctrlr_state(struct pxafb_info *fbi, u_int state);
Expand Down Expand Up @@ -814,6 +811,7 @@ static int pxafb_smart_init(struct pxafb_info *fbi)
__func__);
return PTR_ERR(fbi->smart_thread);
}

return 0;
}
#else
Expand Down Expand Up @@ -976,16 +974,16 @@ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on)
{
pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff");

if (pxafb_backlight_power)
pxafb_backlight_power(on);
if (fbi->backlight_power)
fbi->backlight_power(on);
}

static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
{
pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff");

if (pxafb_lcd_power)
pxafb_lcd_power(on, &fbi->fb.var);
if (fbi->lcd_power)
fbi->lcd_power(on, &fbi->fb.var);
}

static void pxafb_setup_gpio(struct pxafb_info *fbi)
Expand Down Expand Up @@ -1748,8 +1746,7 @@ static int __devinit pxafb_probe(struct platform_device *dev)
ret = -EINVAL;
goto failed;
}
pxafb_backlight_power = inf->pxafb_backlight_power;
pxafb_lcd_power = inf->pxafb_lcd_power;

fbi = pxafb_init_fbinfo(&dev->dev);
if (!fbi) {
/* only reason for pxafb_init_fbinfo to fail is kmalloc */
Expand All @@ -1758,6 +1755,9 @@ static int __devinit pxafb_probe(struct platform_device *dev)
goto failed;
}

fbi->backlight_power = inf->pxafb_backlight_power;
fbi->lcd_power = inf->pxafb_lcd_power;

r = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (r == NULL) {
dev_err(&dev->dev, "no I/O memory resource defined\n");
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/video/pxafb.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ struct pxafb_info {
struct notifier_block freq_transition;
struct notifier_block freq_policy;
#endif

void (*lcd_power)(int, struct fb_var_screeninfo *);
void (*backlight_power)(int);
};

#define TO_INF(ptr,member) container_of(ptr,struct pxafb_info,member)
Expand Down

0 comments on commit 9179ff2

Please sign in to comment.