public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* beginner of a driver-developer
@ 2004-05-06 13:05 dongzai007
  2004-05-06 18:08 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: dongzai007 @ 2004-05-06 13:05 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: beginner of a driver-developer
  2004-05-06 13:05 beginner of a driver-developer dongzai007
@ 2004-05-06 18:08 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2004-05-06 18:08 UTC (permalink / raw)
  To: dongzai007; +Cc: linux-kernel

On Thu, May 06, 2004 at 09:05:08PM +0800, dongzai007@sohu.com 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-06 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-06 13:05 beginner of a driver-developer dongzai007
2004-05-06 18:08 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox