diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2008-03-26 07:08:59 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-04-21 03:50:07 -0400 |
commit | 17672cf0a7cec57dea4c2a6705bd73114d5e9265 (patch) | |
tree | 4c04ec44a992ae6fed7fe0ab0d15cc45bd9dc5df | |
parent | 3925e6fc1f774048404fdd910b0345b06c699eb4 (diff) |
cdrom: remove ifdef CONFIG_SYSCTL
This patch removes #ifdef for CONFIG_SYSCTL by defining empty
cdrom_sysctl_register and cdrom_sysctl_unregister when CONFIG_SYSCTL
is not defined.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | drivers/cdrom/cdrom.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 12f5baea439b..82c7d212409c 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -360,9 +360,8 @@ static int cdrom_mrw_exit(struct cdrom_device_info *cdi); | |||
360 | 360 | ||
361 | static int cdrom_get_disc_info(struct cdrom_device_info *cdi, disc_information *di); | 361 | static int cdrom_get_disc_info(struct cdrom_device_info *cdi, disc_information *di); |
362 | 362 | ||
363 | #ifdef CONFIG_SYSCTL | ||
364 | static void cdrom_sysctl_register(void); | 363 | static void cdrom_sysctl_register(void); |
365 | #endif /* CONFIG_SYSCTL */ | 364 | |
366 | static struct cdrom_device_info *topCdromPtr; | 365 | static struct cdrom_device_info *topCdromPtr; |
367 | 366 | ||
368 | static int cdrom_dummy_generic_packet(struct cdrom_device_info *cdi, | 367 | static int cdrom_dummy_generic_packet(struct cdrom_device_info *cdi, |
@@ -398,9 +397,7 @@ int register_cdrom(struct cdrom_device_info *cdi) | |||
398 | if (!banner_printed) { | 397 | if (!banner_printed) { |
399 | printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n"); | 398 | printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n"); |
400 | banner_printed = 1; | 399 | banner_printed = 1; |
401 | #ifdef CONFIG_SYSCTL | ||
402 | cdrom_sysctl_register(); | 400 | cdrom_sysctl_register(); |
403 | #endif /* CONFIG_SYSCTL */ | ||
404 | } | 401 | } |
405 | 402 | ||
406 | ENSURE(drive_status, CDC_DRIVE_STATUS ); | 403 | ENSURE(drive_status, CDC_DRIVE_STATUS ); |
@@ -3571,22 +3568,29 @@ static void cdrom_sysctl_unregister(void) | |||
3571 | unregister_sysctl_table(cdrom_sysctl_header); | 3568 | unregister_sysctl_table(cdrom_sysctl_header); |
3572 | } | 3569 | } |
3573 | 3570 | ||
3571 | #else /* CONFIG_SYSCTL */ | ||
3572 | |||
3573 | static void cdrom_sysctl_register(void) | ||
3574 | { | ||
3575 | } | ||
3576 | |||
3577 | static void cdrom_sysctl_unregister(void) | ||
3578 | { | ||
3579 | } | ||
3580 | |||
3574 | #endif /* CONFIG_SYSCTL */ | 3581 | #endif /* CONFIG_SYSCTL */ |
3575 | 3582 | ||
3576 | static int __init cdrom_init(void) | 3583 | static int __init cdrom_init(void) |
3577 | { | 3584 | { |
3578 | #ifdef CONFIG_SYSCTL | ||
3579 | cdrom_sysctl_register(); | 3585 | cdrom_sysctl_register(); |
3580 | #endif | 3586 | |
3581 | return 0; | 3587 | return 0; |
3582 | } | 3588 | } |
3583 | 3589 | ||
3584 | static void __exit cdrom_exit(void) | 3590 | static void __exit cdrom_exit(void) |
3585 | { | 3591 | { |
3586 | printk(KERN_INFO "Uniform CD-ROM driver unloaded\n"); | 3592 | printk(KERN_INFO "Uniform CD-ROM driver unloaded\n"); |
3587 | #ifdef CONFIG_SYSCTL | ||
3588 | cdrom_sysctl_unregister(); | 3593 | cdrom_sysctl_unregister(); |
3589 | #endif | ||
3590 | } | 3594 | } |
3591 | 3595 | ||
3592 | module_init(cdrom_init); | 3596 | module_init(cdrom_init); |