Skip to content

Commit

Permalink
[PATCH] pxafb: Minor driver fixes
Browse files Browse the repository at this point in the history
Fixes for the pxafb driver:

* Return -EINVAL for resolutions that are too large as per framebuffer
  driver policy.

* Increase the error timeout for disabling the LCD controller.  The current
  timeout is sometimes too short on the Sharp Zaurus Cxx00 hardware and an
  extra delay in an error path shouldn't pose any problems.

* Fix a dev reference which causes a compile error when DEBUG is defined.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Richard Purdie authored and Linus Torvalds committed Mar 31, 2006
1 parent 2c0f5fb commit 2cbbb3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (var->yres < MIN_YRES)
var->yres = MIN_YRES;
if (var->xres > fbi->max_xres)
var->xres = fbi->max_xres;
return -EINVAL;
if (var->yres > fbi->max_yres)
var->yres = fbi->max_yres;
return -EINVAL;
var->xres_virtual =
max(var->xres_virtual, var->xres);
var->yres_virtual =
Expand Down Expand Up @@ -781,7 +781,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
LCCR0 &= ~LCCR0_LDM; /* Enable LCD Disable Done Interrupt */
LCCR0 |= LCCR0_DIS; /* Disable LCD Controller */

schedule_timeout(20 * HZ / 1000);
schedule_timeout(200 * HZ / 1000);
remove_wait_queue(&fbi->ctrlr_wait, &wait);

/* disable LCD controller clock */
Expand Down Expand Up @@ -1274,7 +1274,7 @@ int __init pxafb_probe(struct platform_device *dev)
struct pxafb_mach_info *inf;
int ret;

dev_dbg(dev, "pxafb_probe\n");
dev_dbg(&dev->dev, "pxafb_probe\n");

inf = dev->dev.platform_data;
ret = -ENOMEM;
Expand Down

0 comments on commit 2cbbb3b

Please sign in to comment.