From fbe3b2f1024161f7470c8104c1a609a5da07d846 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Sat, 16 Aug 2008 03:50:51 -0400 Subject: [PATCH] --- yaml --- r: 108655 b: refs/heads/master c: 4f3e2664622d23a17c6fc45a4df4c35cd2612ffb h: refs/heads/master i: 108653: 9ca6dcb2542248d09e46d845eb0f7553c459900c 108651: 013a0454c7faf3eb395a8a5f2140318959b6d9fd 108647: 0025c77d854597a901d8fdb59e2a0afa7fa63258 108639: 3371a81189dcf6eaf00df68389ac8defe05d94b2 v: v3 --- [refs] | 2 +- trunk/drivers/video/pxafb.c | 62 +++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/[refs] b/[refs] index 591ba34f2e23..d5072e10180e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a1ac7e498b9fc367235aabeb5b86c1319db1de9 +refs/heads/master: 4f3e2664622d23a17c6fc45a4df4c35cd2612ffb diff --git a/trunk/drivers/video/pxafb.c b/trunk/drivers/video/pxafb.c index fa108dad09bf..97204497d9f7 100644 --- a/trunk/drivers/video/pxafb.c +++ b/trunk/drivers/video/pxafb.c @@ -1677,53 +1677,63 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)"); #define pxafb_setup_options() (0) #endif -static int __devinit pxafb_probe(struct platform_device *dev) -{ - struct pxafb_info *fbi; - struct pxafb_mach_info *inf; - struct resource *r; - int irq, ret; - - dev_dbg(&dev->dev, "pxafb_probe\n"); - - inf = dev->dev.platform_data; - ret = -ENOMEM; - fbi = NULL; - if (!inf) - goto failed; - - ret = pxafb_parse_options(&dev->dev, g_options); - if (ret < 0) - goto failed; - #ifdef DEBUG_VAR - /* Check for various illegal bit-combinations. Currently only - * a warning is given. */ +/* Check for various illegal bit-combinations. Currently only + * a warning is given. */ +static void __devinit pxafb_check_options(struct device *dev, + struct pxafb_mach_info *inf) +{ + if (inf->lcd_conn) + return; if (inf->lccr0 & LCCR0_INVALID_CONFIG_MASK) - dev_warn(&dev->dev, "machine LCCR0 setting contains " + dev_warn(dev, "machine LCCR0 setting contains " "illegal bits: %08x\n", inf->lccr0 & LCCR0_INVALID_CONFIG_MASK); if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK) - dev_warn(&dev->dev, "machine LCCR3 setting contains " + dev_warn(dev, "machine LCCR3 setting contains " "illegal bits: %08x\n", inf->lccr3 & LCCR3_INVALID_CONFIG_MASK); if (inf->lccr0 & LCCR0_DPD && ((inf->lccr0 & LCCR0_PAS) != LCCR0_Pas || (inf->lccr0 & LCCR0_SDS) != LCCR0_Sngl || (inf->lccr0 & LCCR0_CMS) != LCCR0_Mono)) - dev_warn(&dev->dev, "Double Pixel Data (DPD) mode is " + dev_warn(dev, "Double Pixel Data (DPD) mode is " "only valid in passive mono" " single panel mode\n"); if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Act && (inf->lccr0 & LCCR0_SDS) == LCCR0_Dual) - dev_warn(&dev->dev, "Dual panel only valid in passive mode\n"); + dev_warn(dev, "Dual panel only valid in passive mode\n"); if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Pas && (inf->modes->upper_margin || inf->modes->lower_margin)) - dev_warn(&dev->dev, "Upper and lower margins must be 0 in " + dev_warn(dev, "Upper and lower margins must be 0 in " "passive mode\n"); +} +#else +#define pxafb_check_options(...) do {} while (0) #endif +static int __devinit pxafb_probe(struct platform_device *dev) +{ + struct pxafb_info *fbi; + struct pxafb_mach_info *inf; + struct resource *r; + int irq, ret; + + dev_dbg(&dev->dev, "pxafb_probe\n"); + + inf = dev->dev.platform_data; + ret = -ENOMEM; + fbi = NULL; + if (!inf) + goto failed; + + ret = pxafb_parse_options(&dev->dev, g_options); + if (ret < 0) + goto failed; + + pxafb_check_options(&dev->dev, inf); + dev_dbg(&dev->dev, "got a %dx%dx%d LCD\n", inf->modes->xres, inf->modes->yres,