[PATCH 2/3] media: coda: Add driver for Coda video codec.
Philipp Zabel
p.zabel at pengutronix.de
Mon Jul 9 04:29:53 EDT 2012
Am Montag, den 09.07.2012, 10:14 +0200 schrieb javier Martin:
[...]
> >> +enum coda_platform {
> >> + CODA_INVALID = 0,
> >
> > I don't think CODA_INVALID is useful.
>
> It is, otherwise the following will fail since CODA_IMX27 is 0:
>
> if (of_id)
> dev->devtype = of_id->data;
> else if (pdev_id && pdev_id->driver_data) <-----
> pdev_id->driver_data = CODA_IMX27 = 0
> dev->devtype = &coda_devdata[pdev_id->driver_data];
> else
> return -EINVAL;
Oh, right. I think it should be ok to just remove the
pdev_id->driver_data check.
Since it's all in the same source file, it's unlikely that somebody adds
a platform_device_id to coda_platform_ids array but forgets to set
the .driver_data field.
regards
Philipp
More information about the linux-arm-kernel
mailing list