lkml.org 
[lkml]   [2008]   [Jul]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromDavid Brownell <>
SubjectRe: [patch 2.6.26-rc5] gpio: sysfs interface (updated)
DateTue, 22 Jul 2008 17:01:36 -0700
On Tuesday 22 July 2008, Greg KH wrote:
> 
> > device_create_drvdata() has magically vanished from today's linux-next,
> > so this code doesn't compile any more.
> > 
> > This:
> > 
> > @@ -453,8 +453,8 @@ int gpio_export(unsigned gpio, bool dire
> >       if (status == 0) {
> >               struct device   *dev;
> >  
> > -             dev = device_create_drvdata(&gpio_class, desc->chip->dev, 0,
> > -                             desc, "gpio%d", gpio);
> > +             dev = device_create(&gpio_class, desc->chip->dev, 0, desc,
> > +                                     "gpio%d", gpio);
> 
> Should be NULL instead of 0 there, otherwise sparse will complain.

The zero is a dev_t ... ??  (As Andrew just noted too.)

"desc" might need to be NULL, but it's a valid pointer
(for driver_data).  I think this was a mental off-by-one...





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-07-23 02:03    [from the cache]
©2003-2008