git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
char
/
raw.c
diff --git
a/drivers/char/raw.c
b/drivers/char/raw.c
index
15a7b40
..
579868a
100644
(file)
--- a/
drivers/char/raw.c
+++ b/
drivers/char/raw.c
@@
-10,7
+10,6
@@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/fs.h>
-#include <linux/devfs_fs_kernel.h>
#include <linux/major.h>
#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/major.h>
#include <linux/blkdev.h>
#include <linux/module.h>
@@
-31,7
+30,7
@@
struct raw_device_data {
static struct class *raw_class;
static struct raw_device_data raw_devices[MAX_RAW_MINORS];
static DEFINE_MUTEX(raw_mutex);
static struct class *raw_class;
static struct raw_device_data raw_devices[MAX_RAW_MINORS];
static DEFINE_MUTEX(raw_mutex);
-static
struct file_operations raw_ctl_fops;
/* forward declaration */
+static
const struct file_operations raw_ctl_fops;
/* forward declaration */
/*
* Open/close code for raw IO.
/*
* Open/close code for raw IO.
@@
-262,7
+261,7
@@
static ssize_t raw_file_aio_write(struct kiocb *iocb, const char __user *buf,
}
}
-static struct file_operations raw_fops = {
+static
const
struct file_operations raw_fops = {
.read = generic_file_read,
.aio_read = generic_file_aio_read,
.write = raw_file_write,
.read = generic_file_read,
.aio_read = generic_file_aio_read,
.write = raw_file_write,
@@
-275,7
+274,7
@@
static struct file_operations raw_fops = {
.owner = THIS_MODULE,
};
.owner = THIS_MODULE,
};
-static struct file_operations raw_ctl_fops = {
+static
const
struct file_operations raw_ctl_fops = {
.ioctl = raw_ctl_ioctl,
.open = raw_open,
.owner = THIS_MODULE,
.ioctl = raw_ctl_ioctl,
.open = raw_open,
.owner = THIS_MODULE,
@@
-288,7
+287,6
@@
static struct cdev raw_cdev = {
static int __init raw_init(void)
{
static int __init raw_init(void)
{
- int i;
dev_t dev = MKDEV(RAW_MAJOR, 0);
if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
dev_t dev = MKDEV(RAW_MAJOR, 0);
if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
@@
-310,13
+308,6
@@
static int __init raw_init(void)
}
class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
}
class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
- devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
- S_IFCHR | S_IRUGO | S_IWUGO,
- "raw/rawctl");
- for (i = 1; i < MAX_RAW_MINORS; i++)
- devfs_mk_cdev(MKDEV(RAW_MAJOR, i),
- S_IFCHR | S_IRUGO | S_IWUGO,
- "raw/raw%d", i);
return 0;
error:
return 0;
error:
@@
-326,12
+317,6
@@
error:
static void __exit raw_exit(void)
{
static void __exit raw_exit(void)
{
- int i;
-
- for (i = 1; i < MAX_RAW_MINORS; i++)
- devfs_remove("raw/raw%d", i);
- devfs_remove("raw/rawctl");
- devfs_remove("raw");
class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
class_destroy(raw_class);
cdev_del(&raw_cdev);
class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
class_destroy(raw_class);
cdev_del(&raw_cdev);