···849849 return;850850 }851851 put_tty_driver(stli_serial);852852- for (i = 0; i < 4; i++) {853853- devfs_remove("staliomem/%d", i);852852+ for (i = 0; i < 4; i++)854853 class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i));855855- }856856- devfs_remove("staliomem");857854 class_destroy(istallion_class);858855 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))859856 printk("STALLION: failed to un-register serial memory device, "
···770770771771static int __init ppdev_init (void)772772{773773- int i, err = 0;773773+ int err = 0;774774775775 if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) {776776 printk (KERN_WARNING CHRDEV ": unable to get major %d\n",···791791 goto out;792792793793out_class:794794- for (i = 0; i < PARPORT_MAX; i++)795795- devfs_remove("parports/%d", i);796796- devfs_remove("parports");797794 class_destroy(ppdev_class);798795out_chrdev:799796 unregister_chrdev(PP_MAJOR, CHRDEV);···800803801804static void __exit ppdev_cleanup (void)802805{803803- int i;804806 /* Clean up all parport stuff */805805- for (i = 0; i < PARPORT_MAX; i++)806806- devfs_remove("parports/%d", i);807807 parport_unregister_driver(&pp_driver);808808- devfs_remove("parports");809808 class_destroy(ppdev_class);810809 unregister_chrdev (PP_MAJOR, CHRDEV);811810}
-6
drivers/char/raw.c
···318318319319static void __exit raw_exit(void)320320{321321- int i;322322-323323- for (i = 1; i < MAX_RAW_MINORS; i++)324324- devfs_remove("raw/raw%d", i);325325- devfs_remove("raw/rawctl");326326- devfs_remove("raw");327321 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));328322 class_destroy(raw_class);329323 cdev_del(&raw_cdev);
+1-4
drivers/char/stallion.c
···773773 restore_flags(flags);774774 return;775775 }776776- for (i = 0; i < 4; i++) {777777- devfs_remove("staliomem/%d", i);776776+ for (i = 0; i < 4; i++)778777 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));779779- }780780- devfs_remove("staliomem");781778 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))782779 printk("STALLION: failed to un-register serial memory device, "783780 "errno=%d\n", -i);
···7474static void dm_hash_exit(void)7575{7676 dm_hash_remove_all(0);7777- devfs_remove(DM_DIR);7877}79788079/*-----------------------------------------------------------------···170171}171172172173/*173173- * devfs stuff.174174- */175175-static int unregister_with_devfs(struct hash_cell *hc)176176-{177177- devfs_remove(DM_DIR"/%s", hc->name);178178- return 0;179179-}180180-181181-/*182174 * The kdev_t and uuid of a device can never change once it is183175 * initially inserted.184176 */···224234 /* remove from the dev hash */225235 list_del(&hc->uuid_list);226236 list_del(&hc->name_list);227227- unregister_with_devfs(hc);228237 dm_set_mdptr(hc->md, NULL);229238230239 table = dm_get_table(hc->md);···319330 /*320331 * rename and move the name cell.321332 */322322- unregister_with_devfs(hc);323323-324333 list_del(&hc->name_list);325334 old_name = hc->name;326335 hc->name = new_name;
+1-7
drivers/md/md.c
···56115611{56125612 mddev_t *mddev;56135613 struct list_head *tmp;56145614- int i;56145614+56155615 blk_unregister_region(MKDEV(MAJOR_NR,0), MAX_MD_DEVS);56165616 blk_unregister_region(MKDEV(mdp_major,0), MAX_MD_DEVS << MdpMinorShift);56175617- for (i=0; i < MAX_MD_DEVS; i++)56185618- devfs_remove("md/%d", i);56195619- for (i=0; i < MAX_MD_DEVS; i++)56205620- devfs_remove("md/d%d", i);56215621-56225622- devfs_remove("md");5623561756245618 unregister_blkdev(MAJOR_NR,"md");56255619 unregister_blkdev(mdp_major, "mdp");
···26742674 cardmap_destroy(&all_ppp_units);26752675 if (unregister_chrdev(PPP_MAJOR, "ppp") != 0)26762676 printk(KERN_ERR "PPP: failed to unregister PPP device\n");26772677- devfs_remove("ppp");26782677 class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));26792678 class_destroy(ppp_class);26802679}
+1-4
drivers/net/wan/cosa.c
···418418 int i;419419 printk(KERN_INFO "Unloading the cosa module\n");420420421421- for (i=0; i<nr_cards; i++) {421421+ for (i=0; i<nr_cards; i++)422422 class_device_destroy(cosa_class, MKDEV(cosa_major, i));423423- devfs_remove("cosa/%d", i);424424- }425423 class_destroy(cosa_class);426426- devfs_remove("cosa");427424 for (cosa=cosa_cards; nr_cards--; cosa++) {428425 /* Clean up the per-channel data */429426 for (i=0; i<cosa->nchannels; i++) {