From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: Probable module bug in linux-2.6.5-1.358
Date: Thu, 07 Oct 2004 15:09:28 -0700 [thread overview]
Message-ID: <1097186968.29576.26.camel@localhost.localdomain> (raw)
In-Reply-To: Pine.LNX.4.61.0410071640250.3287@chaos.analogic.com
I can't reproduce your problem with a simple dummy character device.
-------------
/*
* Minimum driver to test character device stuff.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/device.h>
#define MYMAJOR 204
static int dummy_open(struct inode *inode, struct file *file)
{
pr_info("dummy_open (%d)\n", iminor(inode));
return 0;
}
static int dummy_release(struct inode *inode, struct file *file)
{
pr_info("dummy_release (%d)\n", iminor(inode));
return 0;
}
static struct file_operations dummy_ops = {
.owner = THIS_MODULE,
.open = dummy_open,
.release = dummy_release,
};
static int __init dummy_init(void)
{
pr_info("dummy module init\n");
return register_chrdev(MYMAJOR, "dummy", &dummy_ops);
}
static void __exit dummy_exit(void)
{
pr_info("dummy module unloaded\n");
unregister_chrdev(MYMAJOR, "dummy");
}
module_init(dummy_init);
module_exit(dummy_exit);
MODULE_LICENSE("GPL");
next prev parent reply other threads:[~2004-10-07 22:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 22:08 Probable module bug in linux-2.6.5-1.358 Richard B. Johnson
2004-10-06 23:20 ` Stephen Hemminger
2004-10-06 22:38 ` Alan Cox
2004-10-06 23:22 ` Stephen Hemminger
2004-10-07 11:50 ` Richard B. Johnson
2004-10-07 9:59 ` Arjan van de Ven
[not found] ` <Pine.LNX.4.61.0410070753060.9988@chaos.analogic.com>
2004-10-07 12:17 ` Arjan van de Ven
2004-10-07 12:26 ` Richard B. Johnson
2004-10-07 12:28 ` Arjan van de Ven
2004-10-07 12:34 ` Richard B. Johnson
2004-10-07 12:57 ` Richard B. Johnson
2004-10-07 17:25 ` Stephen Hemminger
2004-10-07 18:25 ` Richard B. Johnson
2004-10-07 19:05 ` Stephen Hemminger
2004-10-07 18:59 ` Alan Cox
2004-10-07 20:27 ` Stephen Hemminger
2004-10-07 20:48 ` Richard B. Johnson
2004-10-07 21:35 ` Valdis.Kletnieks
2004-10-07 22:09 ` Stephen Hemminger [this message]
2004-10-07 19:12 ` Richard B. Johnson
2004-10-07 19:27 ` Richard B. Johnson
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=1097186968.29576.26.camel@localhost.localdomain \
--to=shemminger@osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.