Lines 227-246
Link Here
|
227 |
static void __exit gpib_common_exit_module( void ) |
227 |
static void __exit gpib_common_exit_module( void ) |
228 |
{ |
228 |
{ |
229 |
int i; |
229 |
int i; |
230 |
int retval; |
|
|
231 |
for(i = 0; i < GPIB_MAX_NUM_BOARDS; ++i) |
230 |
for(i = 0; i < GPIB_MAX_NUM_BOARDS; ++i) |
232 |
{ |
231 |
{ |
233 |
class_device_destroy(gpib_class, MKDEV(IBMAJOR, i)); |
232 |
class_device_destroy(gpib_class, MKDEV(IBMAJOR, i)); |
234 |
} |
233 |
} |
235 |
class_destroy(gpib_class); |
234 |
class_destroy(gpib_class); |
236 |
retval = unregister_chrdev(IBMAJOR, "gpib"); |
235 |
unregister_chrdev(IBMAJOR, "gpib"); |
237 |
if(retval) |
|
|
238 |
{ |
239 |
printk("gpib: unregister_chrdev() returned error %i\n", retval); |
240 |
}else |
241 |
{ |
242 |
printk("gpib: succesfully removed \n"); |
243 |
} |
244 |
} |
236 |
} |
245 |
|
237 |
|
246 |
module_init( gpib_common_init_module ); |
238 |
module_init( gpib_common_init_module ); |