Re: beginner of a driver-developer

From: Sam Ravnborg
Date: Thu May 06 2004 - 13:03:59 EST


On Thu, May 06, 2004 at 09:05:08PM +0800, dongzai007@xxxxxxxx wrote:
> I am a beginner of a driver-developer.
> I got some problems.
>
> you know some structs such as "file_operation" were defined in Header Files.when I define a struct in .C files,i always got errors below:
>
> fops has an incomplete type
> storage size of 'fops' isn't known
>
> In my .C files , I defined as followed:
>
> .....................
> struct file_operation fops;
> .....................
>
> How can i solve this sort of problems. Thank you.

In this particular case you did not include the header file that defines the
file_operations struct.
May I suggest you read "Linux Device drivers" by Jonathan Corbet.
It's available somewhere on the net, but I can recommend the paper version.
On lwn.net there is also a nice series of articles refelcting the changes
from 2.4 -> 2.6, also made by said Jonathan Corbet.


Sam
-
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/