aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-04-26 17:36:42 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 17:36:42 +0200
commit1134b6fec57de7de2c56485bcd2afd9c16295dcb (patch)
tree7fada34fb502bec92a1061bc705d2990689c4724
parent177773ed87586214c423ef1204b42d35f0ec8f81 (diff)
ide-cd: put proc-related functions together under single ifdef
[bart: ported it over Paolo's patch] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-cd.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 3a8e8eb61e2..1afd95ad465 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1898,19 +1898,6 @@ int ide_cdrom_setup(ide_drive_t *drive)
return 0;
}
-#ifdef CONFIG_IDE_PROC_FS
-static
-sector_t ide_cdrom_capacity(ide_drive_t *drive)
-{
- unsigned long capacity, sectors_per_frame;
-
- if (cdrom_read_capacity(drive, &capacity, &sectors_per_frame, NULL))
- return 0;
-
- return capacity * sectors_per_frame;
-}
-#endif
-
static void ide_cd_remove(ide_drive_t *drive)
{
struct cdrom_info *info = drive->driver_data;
@@ -1943,6 +1930,16 @@ static void ide_cd_release(struct kref *kref)
static int ide_cd_probe(ide_drive_t *);
#ifdef CONFIG_IDE_PROC_FS
+static sector_t ide_cdrom_capacity(ide_drive_t *drive)
+{
+ unsigned long capacity, sectors_per_frame;
+
+ if (cdrom_read_capacity(drive, &capacity, &sectors_per_frame, NULL))
+ return 0;
+
+ return capacity * sectors_per_frame;
+}
+
static int proc_idecd_read_capacity
(char *page, char **start, off_t off, int count, int *eof, void *data)
{