aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-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 3a8e8eb61e29..1afd95ad4653 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)
1898 return 0; 1898 return 0;
1899} 1899}
1900 1900
1901#ifdef CONFIG_IDE_PROC_FS
1902static
1903sector_t ide_cdrom_capacity(ide_drive_t *drive)
1904{
1905 unsigned long capacity, sectors_per_frame;
1906
1907 if (cdrom_read_capacity(drive, &capacity, &sectors_per_frame, NULL))
1908 return 0;
1909
1910 return capacity * sectors_per_frame;
1911}
1912#endif
1913
1914static void ide_cd_remove(ide_drive_t *drive) 1901static void ide_cd_remove(ide_drive_t *drive)
1915{ 1902{
1916 struct cdrom_info *info = drive->driver_data; 1903 struct cdrom_info *info = drive->driver_data;
@@ -1943,6 +1930,16 @@ static void ide_cd_release(struct kref *kref)
1943static int ide_cd_probe(ide_drive_t *); 1930static int ide_cd_probe(ide_drive_t *);
1944 1931
1945#ifdef CONFIG_IDE_PROC_FS 1932#ifdef CONFIG_IDE_PROC_FS
1933static sector_t ide_cdrom_capacity(ide_drive_t *drive)
1934{
1935 unsigned long capacity, sectors_per_frame;
1936
1937 if (cdrom_read_capacity(drive, &capacity, &sectors_per_frame, NULL))
1938 return 0;
1939
1940 return capacity * sectors_per_frame;
1941}
1942
1946static int proc_idecd_read_capacity 1943static int proc_idecd_read_capacity
1947 (char *page, char **start, off_t off, int count, int *eof, void *data) 1944 (char *page, char **start, off_t off, int count, int *eof, void *data)
1948{ 1945{