Re: [PATCH 2/3] media: coda: Add driver for Coda video codec.
- Subject: Re: [PATCH 2/3] media: coda: Add driver for Coda video codec.
- From: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
- Date: Mon, 09 Jul 2012 10:29:53 +0200
- Cc: linux-media@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx, kyungmin.park@xxxxxxxxxxx, s.nawrocki@xxxxxxxxxxx, laurent.pinchart@xxxxxxxxxxxxxxxx, shawn.guo@xxxxxxxxxx, fabio.estevam@xxxxxxxxxxxxx, richard.zhu@xxxxxxxxxx, arnaud.patard@xxxxxxxxxxx, kernel@xxxxxxxxxxxxxx, mchehab@xxxxxxxxxxxxx
- In-reply-to: <CACKLOr0UrZ2bi01L+xub7ARwfnoN7kriGpwWfwWzx-MYgS-H8w@mail.gmail.com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Input]
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]