diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-11 12:28:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:17:07 -0400 |
commit | f39d88adc5daf544cf9ae666a097b595b212871e (patch) | |
tree | 2aad8a693ca92cb6bf416e8b5b811d600593706b /drivers | |
parent | 2db5f59ca74d911f93c39494db1581c3c93d5a29 (diff) |
[PATCH] z2_init() in non-modular case
... another victim - this time of 2.5.1-pre2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/z2ram.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 82ddbdd7bd4b..7cc2685ca84a 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c | |||
@@ -329,7 +329,7 @@ static struct kobject *z2_find(dev_t dev, int *part, void *data) | |||
329 | 329 | ||
330 | static struct request_queue *z2_queue; | 330 | static struct request_queue *z2_queue; |
331 | 331 | ||
332 | int __init | 332 | static int __init |
333 | z2_init(void) | 333 | z2_init(void) |
334 | { | 334 | { |
335 | int ret; | 335 | int ret; |
@@ -370,26 +370,7 @@ err: | |||
370 | return ret; | 370 | return ret; |
371 | } | 371 | } |
372 | 372 | ||
373 | #if defined(MODULE) | 373 | static void __exit z2_exit(void) |
374 | |||
375 | MODULE_LICENSE("GPL"); | ||
376 | |||
377 | int | ||
378 | init_module( void ) | ||
379 | { | ||
380 | int error; | ||
381 | |||
382 | error = z2_init(); | ||
383 | if ( error == 0 ) | ||
384 | { | ||
385 | printk( KERN_INFO DEVICE_NAME ": loaded as module\n" ); | ||
386 | } | ||
387 | |||
388 | return error; | ||
389 | } | ||
390 | |||
391 | void | ||
392 | cleanup_module( void ) | ||
393 | { | 374 | { |
394 | int i, j; | 375 | int i, j; |
395 | blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); | 376 | blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); |
@@ -425,4 +406,7 @@ cleanup_module( void ) | |||
425 | 406 | ||
426 | return; | 407 | return; |
427 | } | 408 | } |
428 | #endif | 409 | |
410 | module_init(z2_init); | ||
411 | module_exit(z2_exit); | ||
412 | MODULE_LICENSE("GPL"); | ||