Commit 84cbffc0 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] xd cleanup

	switched to devfs_remove(), killed gratitious devfs_handle_t variable.
parent 025cfa69
...@@ -146,8 +146,6 @@ static int nodma = XD_DONT_USE_DMA; ...@@ -146,8 +146,6 @@ static int nodma = XD_DONT_USE_DMA;
static struct request_queue xd_queue; static struct request_queue xd_queue;
static devfs_handle_t devfs_handle = NULL;
/* xd_init: register the block device number and set up pointer tables */ /* xd_init: register the block device number and set up pointer tables */
static int __init xd_init(void) static int __init xd_init(void)
{ {
...@@ -178,7 +176,7 @@ static int __init xd_init(void) ...@@ -178,7 +176,7 @@ static int __init xd_init(void)
printk("xd: Unable to get major number %d\n",MAJOR_NR); printk("xd: Unable to get major number %d\n",MAJOR_NR);
goto out1; goto out1;
} }
devfs_handle = devfs_mk_dir (NULL, "xd", NULL); devfs_mk_dir(NULL, "xd", NULL);
blk_init_queue(&xd_queue, do_xd_request, &xd_lock); blk_init_queue(&xd_queue, do_xd_request, &xd_lock);
if (xd_detect(&controller,&address)) { if (xd_detect(&controller,&address)) {
...@@ -246,6 +244,7 @@ static int __init xd_init(void) ...@@ -246,6 +244,7 @@ static int __init xd_init(void)
out3: out3:
release_region(xd_iobase,4); release_region(xd_iobase,4);
out2: out2:
devfs_remove("xd");
blk_cleanup_queue(&xd_queue); blk_cleanup_queue(&xd_queue);
unregister_blkdev(MAJOR_NR, "xd"); unregister_blkdev(MAJOR_NR, "xd");
out1: out1:
...@@ -1055,7 +1054,7 @@ void cleanup_module(void) ...@@ -1055,7 +1054,7 @@ void cleanup_module(void)
} }
blk_cleanup_queue(&xd_queue); blk_cleanup_queue(&xd_queue);
release_region(xd_iobase,4); release_region(xd_iobase,4);
devfs_unregister (devfs_handle); devfs_remove("xd");
if (xd_drives) { if (xd_drives) {
free_irq(xd_irq, NULL); free_irq(xd_irq, NULL);
free_dma(xd_dma); free_dma(xd_dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment