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
/
net
/
wan
/
cosa.c
diff --git
a/drivers/net/wan/cosa.c
b/drivers/net/wan/cosa.c
index
921a573
..
e392ee8
100644
(file)
--- a/
drivers/net/wan/cosa.c
+++ b/
drivers/net/wan/cosa.c
@@
-235,7
+235,7
@@
static int dma[MAX_CARDS+1];
static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, };
/* for class stuff*/
static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, };
/* for class stuff*/
-static struct class
_simple
*cosa_class;
+static struct class *cosa_class;
#ifdef MODULE
module_param_array(io, int, NULL, 0);
#ifdef MODULE
module_param_array(io, int, NULL, 0);
@@
-394,19
+394,19
@@
static int __init cosa_init(void)
goto out;
}
devfs_mk_dir("cosa");
goto out;
}
devfs_mk_dir("cosa");
- cosa_class = class_
simple_
create(THIS_MODULE, "cosa");
+ cosa_class = class_create(THIS_MODULE, "cosa");
if (IS_ERR(cosa_class)) {
err = PTR_ERR(cosa_class);
goto out_chrdev;
}
for (i=0; i<nr_cards; i++) {
if (IS_ERR(cosa_class)) {
err = PTR_ERR(cosa_class);
goto out_chrdev;
}
for (i=0; i<nr_cards; i++) {
- class_
simple_device_add(cosa_class
, MKDEV(cosa_major, i),
+ class_
device_create(cosa_class, NULL
, MKDEV(cosa_major, i),
NULL, "cosa%d", i);
err = devfs_mk_cdev(MKDEV(cosa_major, i),
S_IFCHR|S_IRUSR|S_IWUSR,
"cosa/%d", i);
if (err) {
NULL, "cosa%d", i);
err = devfs_mk_cdev(MKDEV(cosa_major, i),
S_IFCHR|S_IRUSR|S_IWUSR,
"cosa/%d", i);
if (err) {
- class_
simple_device_remove(
MKDEV(cosa_major, i));
+ class_
device_destroy(cosa_class,
MKDEV(cosa_major, i));
goto out_chrdev;
}
}
goto out_chrdev;
}
}
@@
-427,10
+427,10
@@
static void __exit cosa_exit(void)
printk(KERN_INFO "Unloading the cosa module\n");
for (i=0; i<nr_cards; i++) {
printk(KERN_INFO "Unloading the cosa module\n");
for (i=0; i<nr_cards; i++) {
- class_
simple_device_remove(
MKDEV(cosa_major, i));
+ class_
device_destroy(cosa_class,
MKDEV(cosa_major, i));
devfs_remove("cosa/%d", i);
}
devfs_remove("cosa/%d", i);
}
- class_
simple_
destroy(cosa_class);
+ class_destroy(cosa_class);
devfs_remove("cosa");
for (cosa=cosa_cards; nr_cards--; cosa++) {
/* Clean up the per-channel data */
devfs_remove("cosa");
for (cosa=cosa_cards; nr_cards--; cosa++) {
/* Clean up the per-channel data */
@@
-1617,8
+1617,7
@@
static int get_wait_data(struct cosa_data *cosa)
return r;
}
/* sleep if not ready to read */
return r;
}
/* sleep if not ready to read */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
}
printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n",
cosa_getstatus(cosa));
}
printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n",
cosa_getstatus(cosa));
@@
-1644,8
+1643,7
@@
static int put_wait_data(struct cosa_data *cosa, int data)
}
#if 0
/* sleep if not ready to read */
}
#if 0
/* sleep if not ready to read */
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
#endif
}
printk(KERN_INFO "cosa%d: timeout in put_wait_data (status 0x%x)\n",
#endif
}
printk(KERN_INFO "cosa%d: timeout in put_wait_data (status 0x%x)\n",