This patch fixes memory size detection on the CG6 card.
The 1MB TGX card has dblbuf property set to 0.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
        struct fb_info *info;
        struct cg6_par *par;
        int linebytes, err;
+       int dblbuf;
 
        info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
 
        linebytes = of_getintprop_default(dp, "linebytes",
                                          info->var.xres);
        par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
-       if (of_find_property(dp, "dblbuf", NULL))
+
+       dblbuf = of_getintprop_default(dp, "dblbuf", 0);
+       if (dblbuf)
                par->fbsize *= 4;
 
        par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,