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
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
char
/
ppdev.c
diff --git
a/drivers/char/ppdev.c
b/drivers/char/ppdev.c
index
5eda075
..
bee6c47
100644
(file)
--- a/
drivers/char/ppdev.c
+++ b/
drivers/char/ppdev.c
@@
-65,10
+65,11
@@
#include <linux/parport.h>
#include <linux/ctype.h>
#include <linux/poll.h>
#include <linux/parport.h>
#include <linux/ctype.h>
#include <linux/poll.h>
-#include <
asm/uaccess
.h>
+#include <
linux/major
.h>
#include <linux/ppdev.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
#include <linux/ppdev.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
+#include <asm/uaccess.h>
#define PP_VERSION "ppdev: user-space parallel port driver"
#define CHRDEV "ppdev"
#define PP_VERSION "ppdev: user-space parallel port driver"
#define CHRDEV "ppdev"
@@
-737,7
+738,7
@@
static unsigned int pp_poll (struct file * file, poll_table * wait)
return mask;
}
return mask;
}
-static struct class
_simple
*ppdev_class;
+static struct class *ppdev_class;
static struct file_operations pp_fops = {
.owner = THIS_MODULE,
static struct file_operations pp_fops = {
.owner = THIS_MODULE,
@@
-752,13
+753,13
@@
static struct file_operations pp_fops = {
static void pp_attach(struct parport *port)
{
static void pp_attach(struct parport *port)
{
- class_
simple_device_add(ppdev_class
, MKDEV(PP_MAJOR, port->number),
+ class_
device_create(ppdev_class, NULL
, MKDEV(PP_MAJOR, port->number),
NULL, "parport%d", port->number);
}
static void pp_detach(struct parport *port)
{
NULL, "parport%d", port->number);
}
static void pp_detach(struct parport *port)
{
- class_
simple_device_remove(
MKDEV(PP_MAJOR, port->number));
+ class_
device_destroy(ppdev_class,
MKDEV(PP_MAJOR, port->number));
}
static struct parport_driver pp_driver = {
}
static struct parport_driver pp_driver = {
@@
-776,7
+777,7
@@
static int __init ppdev_init (void)
PP_MAJOR);
return -EIO;
}
PP_MAJOR);
return -EIO;
}
- ppdev_class = class_
simple_
create(THIS_MODULE, CHRDEV);
+ ppdev_class = class_create(THIS_MODULE, CHRDEV);
if (IS_ERR(ppdev_class)) {
err = PTR_ERR(ppdev_class);
goto out_chrdev;
if (IS_ERR(ppdev_class)) {
err = PTR_ERR(ppdev_class);
goto out_chrdev;
@@
-798,7
+799,7
@@
out_class:
for (i = 0; i < PARPORT_MAX; i++)
devfs_remove("parports/%d", i);
devfs_remove("parports");
for (i = 0; i < PARPORT_MAX; i++)
devfs_remove("parports/%d", i);
devfs_remove("parports");
- class_
simple_
destroy(ppdev_class);
+ class_destroy(ppdev_class);
out_chrdev:
unregister_chrdev(PP_MAJOR, CHRDEV);
out:
out_chrdev:
unregister_chrdev(PP_MAJOR, CHRDEV);
out:
@@
-813,7
+814,7
@@
static void __exit ppdev_cleanup (void)
devfs_remove("parports/%d", i);
parport_unregister_driver(&pp_driver);
devfs_remove("parports");
devfs_remove("parports/%d", i);
parport_unregister_driver(&pp_driver);
devfs_remove("parports");
- class_
simple_
destroy(ppdev_class);
+ class_destroy(ppdev_class);
unregister_chrdev (PP_MAJOR, CHRDEV);
}
unregister_chrdev (PP_MAJOR, CHRDEV);
}