]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-cd.c
ide-cd: put proc-related functions together under single ifdef
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-cd.c
index 3a8e8eb61e291f1ed412501a8078c1fc10a49ccc..1afd95ad46538144e610a37a7559d30c3822dda0 100644 (file)
@@ -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)
 {