> On Fri, Nov 09, 2007 at 05:02:38PM -0800, Andrew Morton (
akpm@linux-foundation.org) wrote:
> > > @@ -351,6 +351,10 @@ static int ds1wm_probe(struct platform_device *pdev)
> > > goto err0;
> > > }
> > > plat = pdev->dev.platform_data;
> > > + if (!plat) {
> > > + ret = -ENXIO;
> > > + goto err0;
> > > + }
> > > ds1wm_data->bus_shift = plat->bus_shift;
> > > ds1wm_data->pdev = pdev;
> > > ds1wm_data->pdata = plat;
> >
> > I don't understand this change. Could you please provide some more details
> > regarding what problem it is solving? How can pdev->dev.platform_data==NULL
> > come about?
>
> If I understood correctly, it is posible to call platform's probe
> callback without previously calling platform_device_add_data() to setup
> platform_data.
>
> But actually I failed to find any user of this platform driver in
> vanilla kernel, so it is hard to say if driver is used properly or not
> by external modules, and thus this change is very likely valid.
>
> --
> Evgeniy Polyakov
>