diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-04 15:20:16 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-05 09:41:27 +0100 |
commit | ef191db8afc4c78d9a6f01228c50dce3a8e5b59f (patch) | |
tree | bca1048fce1d51f9f6435226dcf3e2839ce02b6e /drivers/video | |
parent | e3d1b992923dc59652adac072d10812eb332b373 (diff) | |
download | barebox-ef191db8afc4c78d9a6f01228c50dce3a8e5b59f.tar.gz barebox-ef191db8afc4c78d9a6f01228c50dce3a8e5b59f.tar.xz |
video imx: specify num_modes in platform_data
Without num_modes the imx fb driver won't work. Specify this
in the boards and also bail out in the driver when num_modes
is unspecified.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/imx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/imx.c b/drivers/video/imx.c index 78179afb78..452e558cfe 100644 --- a/drivers/video/imx.c +++ b/drivers/video/imx.c @@ -552,6 +552,11 @@ static int imxfb_probe(struct device_d *dev) writel(readl(IMX_CCM_BASE + CCM_CGCR1) & ~(1 << 29), IMX_CCM_BASE + CCM_CGCR1); #endif + if (!pdata->num_modes) { + dev_err(dev, "no modes. bailing out\n"); + return -EINVAL; + } + mode_list = xzalloc(sizeof(*mode_list) * pdata->num_modes); for (i = 0; i < pdata->num_modes; i++) mode_list[i] = pdata->mode[i].mode; |