Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Al Viro and committed by
Linus Torvalds
f39d88ad 2db5f59c

+6 -22
+6 -22
drivers/block/z2ram.c
··· 329 329 330 330 static struct request_queue *z2_queue; 331 331 332 - int __init 332 + static int __init 333 333 z2_init(void) 334 334 { 335 335 int ret; ··· 370 370 return ret; 371 371 } 372 372 373 - #if defined(MODULE) 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 ) 373 + static void __exit z2_exit(void) 393 374 { 394 375 int i, j; 395 376 blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); ··· 406 425 407 426 return; 408 427 } 409 - #endif 428 + 429 + module_init(z2_init); 430 + module_exit(z2_exit); 431 + MODULE_LICENSE("GPL");