mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcus Alanen <marcus@infa.abo.fi>
To: ramands@indiatimes.com, <linux-kernel@vger.kernel.org>
Subject: Re: Compilation Error: variable has intializer but incomplete type
Date: Tue, 1 Apr 2003 12:07:22 +0300	[thread overview]
Message-ID: <200304010907.h3197Mi20706@infa.abo.fi> (raw)
In-Reply-To: <200304010401.JAA16708@WS0005.indiatimes.com>

>i am trying to learn and write device driver on linux kernel 2.4 redhat
>  distribution 
>
>iam getting compilation errors for driver code.
>struct file_operations my_ops ={NULL,my_read,my_write,NULL,NULL,NULL
>NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
>NULL };
>
>ERROR -> my_ops has intializer but incomplete type

This is not a good way to do it. See e.g. fs/pipe.c#read_fifo_fops
for an easier approach:

struct file_operations read_fifo_fops = {
        llseek:         no_llseek,
        read:           pipe_read,
        write:          bad_pipe_w,
        poll:           fifo_poll,
        ioctl:          pipe_ioctl,
        open:           pipe_read_open,
        release:        pipe_read_release,
};


-- 
Marcus Alanen
maalanen@abo.fi

  reply	other threads:[~2003-04-01  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01  4:34 ramands
2003-04-01  9:07 ` Marcus Alanen [this message]
2003-04-01  9:24   ` Sean Neakums
2003-04-01 10:21   ` Jörn Engel

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=200304010907.h3197Mi20706@infa.abo.fi \
    --to=marcus@infa.abo.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramands@indiatimes.com \
    /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®