Commit 47a1397b authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] Remove duplicate calls to ide_cdrom_init(), idedisk_init(), etc

Duplicate calls of ide_cdrom_init(), idedisk_init(), etc. are removed
from ide_init_builtin_drivers() (they were called both from there (i.e.
from ide_init()) and later as module_init() for high-level drivers).
parent 2923c262
......@@ -3047,7 +3047,7 @@ int ide_cdrom_cleanup(ide_drive_t *drive)
return 0;
}
int ide_cdrom_init(void);
static int ide_cdrom_init(void);
int ide_cdrom_reinit (ide_drive_t *drive);
static ide_driver_t ide_cdrom_driver = {
......@@ -3161,7 +3161,7 @@ static void __exit ide_cdrom_exit(void)
ide_unregister_module (&ide_cdrom_module);
}
int ide_cdrom_init(void)
static int ide_cdrom_init(void)
{
ide_drive_t *drive;
int failed = 0;
......
......@@ -1636,7 +1636,7 @@ static int idedisk_cleanup (ide_drive_t *drive)
return ide_unregister_subdriver(drive);
}
int idedisk_init (void);
static int idedisk_init (void);
int idedisk_reinit(ide_drive_t *drive);
/*
......@@ -1735,7 +1735,7 @@ static void __exit idedisk_exit (void)
ide_unregister_module(&idedisk_module);
}
int idedisk_init (void)
static int idedisk_init (void)
{
ide_drive_t *drive;
int failed = 0;
......
......@@ -2143,7 +2143,7 @@ static ide_proc_entry_t idefloppy_proc[] = {
#endif /* CONFIG_PROC_FS */
int idefloppy_init (void);
static int idefloppy_init (void);
int idefloppy_reinit(ide_drive_t *drive);
/*
......@@ -2254,7 +2254,7 @@ static void __exit idefloppy_exit (void)
/*
* idefloppy_init will register the driver for each floppy.
*/
int idefloppy_init (void)
static int idefloppy_init (void)
{
ide_drive_t *drive;
int failed = 0;
......
......@@ -6305,7 +6305,7 @@ static ide_proc_entry_t idetape_proc[] = {
#endif
int idetape_init (void);
static int idetape_init (void);
int idetape_reinit(ide_drive_t *drive);
/*
......@@ -6441,7 +6441,7 @@ static void __exit idetape_exit (void)
/*
* idetape_init will register the driver for each tape.
*/
int idetape_init (void)
static int idetape_init (void)
{
ide_drive_t *drive;
int minor, failed = 0, supported = 0;
......
......@@ -177,7 +177,6 @@ spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
#ifdef CONFIG_BLK_DEV_IDESCSI_24
#define CONFIG_BLK_DEV_IDESCSI
extern int idescsi_init(void);
#endif
#ifdef CONFIG_BLK_DEV_IDEPCI
......@@ -3389,29 +3388,6 @@ void __init ide_init_builtin_drivers (void)
#ifdef CONFIG_PROC_FS
proc_ide_create();
#endif
/*
* Attempt to match drivers for the available drives
*/
#ifdef CONFIG_BLK_DEV_IDEDISK
(void) idedisk_init();
#endif /* CONFIG_BLK_DEV_IDEDISK */
#ifdef CONFIG_BLK_DEV_IDECD
(void) ide_cdrom_init();
#endif /* CONFIG_BLK_DEV_IDECD */
#ifdef CONFIG_BLK_DEV_IDETAPE
(void) idetape_init();
#endif /* CONFIG_BLK_DEV_IDETAPE */
#ifdef CONFIG_BLK_DEV_IDEFLOPPY
(void) idefloppy_init();
#endif /* CONFIG_BLK_DEV_IDEFLOPPY */
#ifdef CONFIG_BLK_DEV_IDESCSI
#ifdef CONFIG_SCSI
(void) idescsi_init();
#else
#warning ide scsi-emulation selected but no SCSI-subsystem in kernel
#endif
#endif /* CONFIG_BLK_DEV_IDESCSI */
}
static int default_cleanup (ide_drive_t *drive)
......
......@@ -569,7 +569,7 @@ static ide_driver_t idescsi_driver = {
drives: LIST_HEAD_INIT(idescsi_driver.drives),
};
int idescsi_init (void);
static int idescsi_init (void);
static ide_module_t idescsi_module = {
IDE_DRIVER_MODULE,
idescsi_init,
......@@ -612,7 +612,7 @@ static int idescsi_reinit(ide_drive_t *drive)
/*
* idescsi_init will register the driver for each scsi.
*/
int idescsi_init (void)
static int idescsi_init (void)
{
ide_drive_t *drive;
int i, failed;
......
......@@ -1220,23 +1220,18 @@ int ideprobe_init (void);
#endif /* CONFIG_BLK_DEV_IDE */
#ifdef CONFIG_BLK_DEV_IDEDISK
int idedisk_reinit (ide_drive_t *drive);
int idedisk_init (void);
#endif /* CONFIG_BLK_DEV_IDEDISK */
#ifdef CONFIG_BLK_DEV_IDECD
int ide_cdrom_reinit (ide_drive_t *drive);
int ide_cdrom_init (void);
#endif /* CONFIG_BLK_DEV_IDECD */
#ifdef CONFIG_BLK_DEV_IDETAPE
int idetape_reinit (ide_drive_t *drive);
int idetape_init (void);
#endif /* CONFIG_BLK_DEV_IDETAPE */
#ifdef CONFIG_BLK_DEV_IDEFLOPPY
int idefloppy_reinit (ide_drive_t *drive);
int idefloppy_init (void);
#endif /* CONFIG_BLK_DEV_IDEFLOPPY */
#ifdef CONFIG_BLK_DEV_IDESCSI
int idescsi_reinit (ide_drive_t *drive);
int idescsi_init (void);
#endif /* CONFIG_BLK_DEV_IDESCSI */
#endif /* _IDE_C */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment