Skip to content

Commit

Permalink
cosa: Convert from class_device to device for cosa sync driver
Browse files Browse the repository at this point in the history
struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Tony Jones authored and Greg Kroah-Hartman committed Jan 25, 2008
1 parent 7dd817d commit 02ff82c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wan/cosa.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ static int __init cosa_init(void)
goto out_chrdev;
}
for (i=0; i<nr_cards; i++) {
class_device_create(cosa_class, NULL, MKDEV(cosa_major, i),
NULL, "cosa%d", i);
device_create(cosa_class, NULL, MKDEV(cosa_major, i), "cosa%d", i);
}
err = 0;
goto out;
Expand All @@ -415,7 +414,7 @@ static void __exit cosa_exit(void)
printk(KERN_INFO "Unloading the cosa module\n");

for (i=0; i<nr_cards; i++)
class_device_destroy(cosa_class, MKDEV(cosa_major, i));
device_destroy(cosa_class, MKDEV(cosa_major, i));
class_destroy(cosa_class);
for (cosa=cosa_cards; nr_cards--; cosa++) {
/* Clean up the per-channel data */
Expand Down

0 comments on commit 02ff82c

Please sign in to comment.