diff options
author | Amos Waterland <apw@us.ibm.com> | 2005-10-30 18:02:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:19 -0500 |
commit | d97b321425e237e3e6c6bbe2c40dc0e09d0e3264 (patch) | |
tree | c119ade2f1c74918e34df729d62ec75113d83d8d /drivers/ide/ide-cd.c | |
parent | 42e50a5a69f359e64a143eb0e11a57e18f10c262 (diff) |
[PATCH] protect ide_cdrom_capacity by ifdef
The only call to ide_cdrom_capacity is in code protected by
CONFIG_PROC_FS, so when that is not enabled, the compiler complains:
drivers/ide/ide-cd.c:3259: warning: `ide_cdrom_capacity' defined but not used
Here is a patch that fixes that. It provides some space savings for
embedded systems that are not using procfs, as well:
text data bss dec hex filename
- 33540 6504 1032 41076 a074 drivers/ide/ide-cd.o
+ 33468 6480 1032 40980 a014 drivers/ide/ide-cd.o
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Cc: Jens Axboe <axboe@suse.de>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 74af7e074868..7130939c7f91 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -3254,6 +3254,7 @@ int ide_cdrom_setup (ide_drive_t *drive) | |||
3254 | return 0; | 3254 | return 0; |
3255 | } | 3255 | } |
3256 | 3256 | ||
3257 | #ifdef CONFIG_PROC_FS | ||
3257 | static | 3258 | static |
3258 | sector_t ide_cdrom_capacity (ide_drive_t *drive) | 3259 | sector_t ide_cdrom_capacity (ide_drive_t *drive) |
3259 | { | 3260 | { |
@@ -3264,6 +3265,7 @@ sector_t ide_cdrom_capacity (ide_drive_t *drive) | |||
3264 | 3265 | ||
3265 | return capacity * sectors_per_frame; | 3266 | return capacity * sectors_per_frame; |
3266 | } | 3267 | } |
3268 | #endif | ||
3267 | 3269 | ||
3268 | static int ide_cd_remove(struct device *dev) | 3270 | static int ide_cd_remove(struct device *dev) |
3269 | { | 3271 | { |