Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d97b3214 authored by Amos Waterland's avatar Amos Waterland Committed by Linus Torvalds
Browse files

[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: default avatarAmos Waterland <apw@us.ibm.com>
Cc: Jens Axboe <axboe@suse.de>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 42e50a5a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3254,6 +3254,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
	return 0;
}

#ifdef CONFIG_PROC_FS
static
sector_t ide_cdrom_capacity (ide_drive_t *drive)
{
@@ -3264,6 +3265,7 @@ sector_t ide_cdrom_capacity (ide_drive_t *drive)

	return capacity * sectors_per_frame;
}
#endif

static int ide_cd_remove(struct device *dev)
{