- for (i=0; i<nr_cards; i++) {
- class_simple_device_remove(MKDEV(cosa_major, i));
- devfs_remove("cosa/%d", i);
- }
- class_simple_destroy(cosa_class);
- devfs_remove("cosa");
+ for (i=0; i<nr_cards; i++)
+ class_device_destroy(cosa_class, MKDEV(cosa_major, i));
+ class_destroy(cosa_class);