diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 57cd21c5b2c1..f429be88c4f9 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -1811,18 +1811,22 @@ 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 | ||
1814 | static void idefloppy_add_settings(ide_drive_t *drive) | 1815 | static 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; |
1817 | 1818 | ||
1818 | /* | 1819 | /* |
1819 | * drive setting name read/write ioctl ioctl data type min max mul_factor div_factor data pointer set function | 1820 | * drive setting name read/write data type min max mul_factor div_factor data pointer set function |
1820 | */ | 1821 | */ |
1821 | ide_add_setting(drive, "bios_cyl", SETTING_RW, -1, -1, TYPE_INT, 0, 1023, 1, 1, &drive->bios_cyl, NULL); | 1822 | ide_add_setting(drive, "bios_cyl", SETTING_RW, TYPE_INT, 0, 1023, 1, 1, &drive->bios_cyl, NULL); |
1822 | ide_add_setting(drive, "bios_head", SETTING_RW, -1, -1, TYPE_BYTE, 0, 255, 1, 1, &drive->bios_head, NULL); | 1823 | ide_add_setting(drive, "bios_head", SETTING_RW, TYPE_BYTE, 0, 255, 1, 1, &drive->bios_head, NULL); |
1823 | ide_add_setting(drive, "bios_sect", SETTING_RW, -1, -1, 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, -1, -1, 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 | ||
1828 | static 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 | ||
@@ -1892,8 +1896,7 @@ static void ide_floppy_release(struct kref *kref) | |||
1892 | kfree(floppy); | 1896 | kfree(floppy); |
1893 | } | 1897 | } |
1894 | 1898 | ||
1895 | #ifdef CONFIG_PROC_FS | 1899 | #ifdef CONFIG_IDE_PROC_FS |
1896 | |||
1897 | static int proc_idefloppy_read_capacity | 1900 | static 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,12 +1912,7 @@ 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 | 1915 | #endif /* CONFIG_IDE_PROC_FS */ | |
1913 | #else | ||
1914 | |||
1915 | #define idefloppy_proc NULL | ||
1916 | |||
1917 | #endif /* CONFIG_PROC_FS */ | ||
1918 | 1916 | ||
1919 | static int ide_floppy_probe(ide_drive_t *); | 1917 | static int ide_floppy_probe(ide_drive_t *); |
1920 | 1918 | ||
@@ -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 | ||
1939 | static int idefloppy_open(struct inode *inode, struct file *filp) | 1939 | static 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 | ||