@@ -1894,25 +1894,6 @@ static int i2o_proc_create_entries(struct proc_dir_entry *dir,
18941894 return 0 ;
18951895}
18961896
1897- /**
1898- * i2o_proc_subdir_remove - Remove child entries from a proc entry
1899- * @dir: proc dir entry from which the childs should be removed
1900- *
1901- * Iterate over each i2o proc entry under dir and remove it. If the child
1902- * also has entries, remove them too.
1903- */
1904- static void i2o_proc_subdir_remove (struct proc_dir_entry * dir )
1905- {
1906- struct proc_dir_entry * pe , * tmp ;
1907- pe = dir -> subdir ;
1908- while (pe ) {
1909- tmp = pe -> next ;
1910- i2o_proc_subdir_remove (pe );
1911- remove_proc_entry (pe -> name , dir );
1912- pe = tmp ;
1913- }
1914- };
1915-
19161897/**
19171898 * i2o_proc_device_add - Add an I2O device to the proc dir
19181899 * @dir: proc dir entry to which the device should be added
@@ -1987,31 +1968,6 @@ static int i2o_proc_iop_add(struct proc_dir_entry *dir,
19871968 return 0 ;
19881969}
19891970
1990- /**
1991- * i2o_proc_iop_remove - Removes an I2O controller from the i2o proc tree
1992- * @dir: parent proc dir entry
1993- * @c: I2O controller which should be removed
1994- *
1995- * Iterate over each i2o proc entry and search controller c. If it is found
1996- * remove it from the tree.
1997- */
1998- static void i2o_proc_iop_remove (struct proc_dir_entry * dir ,
1999- struct i2o_controller * c )
2000- {
2001- struct proc_dir_entry * pe , * tmp ;
2002-
2003- pe = dir -> subdir ;
2004- while (pe ) {
2005- tmp = pe -> next ;
2006- if (pe -> data == c ) {
2007- i2o_proc_subdir_remove (pe );
2008- remove_proc_entry (pe -> name , dir );
2009- }
2010- osm_debug ("removing IOP /proc/i2o/%s\n" , c -> name );
2011- pe = tmp ;
2012- }
2013- }
2014-
20151971/**
20161972 * i2o_proc_fs_create - Create the i2o proc fs.
20171973 *
@@ -2042,12 +1998,7 @@ static int __init i2o_proc_fs_create(void)
20421998 */
20431999static int __exit i2o_proc_fs_destroy (void )
20442000{
2045- struct i2o_controller * c ;
2046-
2047- list_for_each_entry (c , & i2o_controllers , list )
2048- i2o_proc_iop_remove (i2o_proc_dir_root , c );
2049-
2050- remove_proc_entry ("i2o" , NULL );
2001+ remove_proc_subtree ("i2o" , NULL );
20512002
20522003 return 0 ;
20532004};
0 commit comments