mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: dongzai007@sohu.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: beginner of a driver-developer
Date: Thu, 6 May 2004 20:08:53 +0200	[thread overview]
Message-ID: <20040506180853.GB2034@mars.ravnborg.org> (raw)
In-Reply-To: <7475352.1083848708542.JavaMail.postfix@mx0.mail.sohu.com>

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

      reply	other threads:[~2004-05-06 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06 13:05 dongzai007
2004-05-06 18:08 ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040506180853.GB2034@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dongzai007@sohu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®