Add dummy platform data when it's not present. Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx> --- drivers/staging/fbtft/fbtft-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index ac4287f..59c17c1 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -719,10 +719,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, if (!bpp) bpp = 16; - if (!pdata) { - dev_err(dev, "platform data is missing\n"); - return NULL; - } + if (!pdata) + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); /* override driver values? */ if (pdata->fps) -- 2.2.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel