Re: subdevice config into pointer (was Re: [PATCH 1/4] v4l2: device_register_subdev_nodes: allow calling multiple times)
From: Pavel Machek
Date: Thu Mar 02 2017 - 16:28:00 EST
Hi!
> > > static int isp_fwnode_parse(struct device *dev, struct fwnode_handle
> > > *fwn,
> > >
> > > struct isp_async_subdev *isd)
> > >
> > > {
> > >
> > > - struct isp_bus_cfg *buscfg = &isd->bus;
> > > + struct isp_bus_cfg *buscfg;
> > >
> > > struct v4l2_fwnode_endpoint vfwn;
> > > unsigned int i;
> > > int ret;
> > > bool csi1 = false;
> > >
> > > + buscfg = devm_kzalloc(dev, sizeof(*isd->bus), GFP_KERNEL);
>
> Given that you recently get rid of devm_kzalloc() in the driver, let's not
> introduce a new one here.
What is wrong with devm_kzalloc()?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature