On Sat, Jun 21, 2014 at 11:21:47PM +0100, Robert Jarzmik wrote: > Add device-tree support to pxa_camera host driver. > > Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx> > --- > drivers/media/platform/soc_camera/pxa_camera.c | 77 +++++++++++++++++++++++++- > 1 file changed, 75 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c > index d4df305..8c9de9e 100644 > --- a/drivers/media/platform/soc_camera/pxa_camera.c > +++ b/drivers/media/platform/soc_camera/pxa_camera.c > @@ -34,6 +34,7 @@ > #include <media/videobuf-dma-sg.h> > #include <media/soc_camera.h> > #include <media/soc_mediabus.h> > +#include <media/v4l2-of.h> > > #include <linux/videodev2.h> > > @@ -1650,6 +1651,64 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { > .set_bus_param = pxa_camera_set_bus_param, > }; > > +static int pxa_camera_pdata_from_dt(struct device *dev, > + struct pxa_camera_dev *pcdev) > +{ > + int err = 0; > + struct device_node *np = dev->of_node; > + struct v4l2_of_endpoint ep; > + > + err = of_property_read_u32(np, "clock-frequency", > + (u32 *)&pcdev->mclk); That cast is either unnecessary or this code is broken. Use a temporary u32 if the types don't match. Mark. -- 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