Re: [PATCH] C2port:Fix deprecated exported interfaces c2port.h

From: Wanlong Gao
Date: Thu May 05 2011 - 10:31:00 EST


on 2011-05-05 07:10 -0700ïGreg KH wrotedï
> On Thu, May 05, 2011 at 08:29:09PM +0800, Wanlong Gao wrote:
> > From: Wanlong Gao <wanlong.gao@xxxxxxxxx>
> >
> > Change to_class_dev to to_device since the struct class_device had
> > merged to struct device.
> > Fix the to_c2port_device interface since the struct c2port_device
> > has no member named class.
> >
> > Signed-off-by: Wanlong Gao <wanlong.gao@xxxxxxxxx>
> > ---
> > include/linux/c2port.h | 4 ++--
>
> I don't know why you sent this to me, have you looked at the
> scripts/get_maintainer.pl tool?
Yes, I have, but I just get the linux-kernel open list, so I have
no idea but send it to you.
>
>
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/c2port.h b/include/linux/c2port.h
> > index 2a5cd86..7e6bd33 100644
> > --- a/include/linux/c2port.h
> > +++ b/include/linux/c2port.h
> > @@ -60,8 +60,8 @@ struct c2port_ops {
> > * Exported functions
> > */
> >
> > -#define to_class_dev(obj) container_of((obj), struct class_device, kobj)
> > -#define to_c2port_device(obj) container_of((obj), struct c2port_device, class)
> > +#define to_device(obj) container_of(obj, struct device, kobj)
> > +#define to_c2port_device(obj) container_of(obj, struct c2port_device, dev.kobj)
>
> Doesn't this break the build? If not, something is really wrong here.
The interface just exported but not used in the kernel code, so it will
not break the build. The class_device structure is deprecated in your
driver-core, so it really has something wrong here.
>
> confused,
Me too, I checked the log and see that the to_c2port_device had
something wrong in this file's initial version.
>
> greg k-h

Thanks
Best regards

Wanlong Gao

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