lkml.org 
[lkml]   [2010]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: gadget: #include device.h in gadget.h
On Thu, Jul 08, 2010 at 01:03:27PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Greg KH wrote:
>
> >>gadget.h uses structures defined in device.h, it must include it. In
> >>most cases, gadget.h is preceded by linux/platform_device.h, but if
> >>you are grouping headers sanely, device.h may not be pulled in until
> >>*after* gadget (e.g. mach/msm_device.h), thus gadget.h should not
> >>rely on something else #including device.h
>
> As well as a number of other headers. I have postaed a patch
> addressing the missing #include's already.

Yes I know, and my same statment stands.

> >>include/linux/usb/gadget.h:488: error: field 'dev' has incomplete type
>
> >Why not just provide an "empty" prototype for whatever is needed.
>
> Empty prototype of what, 'struct device'? Have you looked at the code at all?

Nope, I try not to :)

> struct device dev;

Ok, that wouldn't work.

> >How about just fixing up the .c file that the problem happens in, to
> >include device.h first? Is this an issue in the current tree somehow?
>
> In my opinion, this is just insane approach.

Sorry, but that seems to go against what the rest of the kernel is
doing.

thanks,

greg k-h


\
 
 \ /
  Last update: 2010-07-08 17:17    [W:0.065 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site