aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 38fe45cf4019..f429be88c4f9 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1811,6 +1811,7 @@ static int idefloppy_identify_device (ide_drive_t *drive,struct hd_driveid *id)
1811 return 0; 1811 return 0;
1812} 1812}
1813 1813
1814#ifdef CONFIG_IDE_PROC_FS
1814static void idefloppy_add_settings(ide_drive_t *drive) 1815static void idefloppy_add_settings(ide_drive_t *drive)
1815{ 1816{
1816 idefloppy_floppy_t *floppy = drive->driver_data; 1817 idefloppy_floppy_t *floppy = drive->driver_data;
@@ -1823,6 +1824,9 @@ static void idefloppy_add_settings(ide_drive_t *drive)
1823 ide_add_setting(drive, "bios_sect", SETTING_RW, TYPE_BYTE, 0, 63, 1, 1, &drive->bios_sect, NULL); 1824 ide_add_setting(drive, "bios_sect", SETTING_RW, TYPE_BYTE, 0, 63, 1, 1, &drive->bios_sect, NULL);
1824 ide_add_setting(drive, "ticks", SETTING_RW, TYPE_BYTE, 0, 255, 1, 1, &floppy->ticks, NULL); 1825 ide_add_setting(drive, "ticks", SETTING_RW, TYPE_BYTE, 0, 255, 1, 1, &floppy->ticks, NULL);
1825} 1826}
1827#else
1828static inline void idefloppy_add_settings(ide_drive_t *drive) { ; }
1829#endif
1826 1830
1827/* 1831/*
1828 * Driver initialization. 1832 * Driver initialization.
@@ -1873,7 +1877,7 @@ static void ide_floppy_remove(ide_drive_t *drive)
1873 idefloppy_floppy_t *floppy = drive->driver_data; 1877 idefloppy_floppy_t *floppy = drive->driver_data;
1874 struct gendisk *g = floppy->disk; 1878 struct gendisk *g = floppy->disk;
1875 1879
1876 ide_unregister_subdriver(drive, floppy->driver); 1880 ide_proc_unregister_driver(drive, floppy->driver);
1877 1881
1878 del_gendisk(g); 1882 del_gendisk(g);
1879 1883
@@ -1893,7 +1897,6 @@ static void ide_floppy_release(struct kref *kref)
1893} 1897}
1894 1898
1895#ifdef CONFIG_IDE_PROC_FS 1899#ifdef CONFIG_IDE_PROC_FS
1896
1897static int proc_idefloppy_read_capacity 1900static int proc_idefloppy_read_capacity
1898 (char *page, char **start, off_t off, int count, int *eof, void *data) 1901 (char *page, char **start, off_t off, int count, int *eof, void *data)
1899{ 1902{
@@ -1909,11 +1912,6 @@ static ide_proc_entry_t idefloppy_proc[] = {
1909 { "geometry", S_IFREG|S_IRUGO, proc_ide_read_geometry, NULL }, 1912 { "geometry", S_IFREG|S_IRUGO, proc_ide_read_geometry, NULL },
1910 { NULL, 0, NULL, NULL } 1913 { NULL, 0, NULL, NULL }
1911}; 1914};
1912
1913#else
1914
1915#define idefloppy_proc NULL
1916
1917#endif /* CONFIG_IDE_PROC_FS */ 1915#endif /* CONFIG_IDE_PROC_FS */
1918 1916
1919static int ide_floppy_probe(ide_drive_t *); 1917static int ide_floppy_probe(ide_drive_t *);
@@ -1933,7 +1931,9 @@ static ide_driver_t idefloppy_driver = {
1933 .end_request = idefloppy_do_end_request, 1931 .end_request = idefloppy_do_end_request,
1934 .error = __ide_error, 1932 .error = __ide_error,
1935 .abort = __ide_abort, 1933 .abort = __ide_abort,
1934#ifdef CONFIG_IDE_PROC_FS
1936 .proc = idefloppy_proc, 1935 .proc = idefloppy_proc,
1936#endif
1937}; 1937};
1938 1938
1939static int idefloppy_open(struct inode *inode, struct file *filp) 1939static int idefloppy_open(struct inode *inode, struct file *filp)
@@ -2159,7 +2159,7 @@ static int ide_floppy_probe(ide_drive_t *drive)
2159 2159
2160 ide_init_disk(g, drive); 2160 ide_init_disk(g, drive);
2161 2161
2162 ide_register_subdriver(drive, &idefloppy_driver); 2162 ide_proc_register_driver(drive, &idefloppy_driver);
2163 2163
2164 kref_init(&floppy->kref); 2164 kref_init(&floppy->kref);
2165 2165