mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
151575e464
* Rename ide_device_add() to ide_device_add_all() and make it accept 'u8 idx[MAX_HWIFS]' instead of 'u8 idx[4]' as an argument. * Add ide_device_add() wrapper for ide_device_add_all(). * Convert ide_generic_init() to use ide_device_add_all(). * Remove no longer needed ideprobe_init(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
37 lines
779 B
C
37 lines
779 B
C
/*
|
|
* generic/default IDE host driver
|
|
*
|
|
* Copyright (C) 2004 Bartlomiej Zolnierkiewicz
|
|
* This code was split off from ide.c. See it for original copyrights.
|
|
*
|
|
* May be copied or modified under the terms of the GNU General Public License.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/ide.h>
|
|
|
|
static int __init ide_generic_init(void)
|
|
{
|
|
u8 idx[MAX_HWIFS];
|
|
int i;
|
|
|
|
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
|
|
ide_get_lock(NULL, NULL); /* for atari only */
|
|
|
|
for (i = 0; i < MAX_HWIFS; i++)
|
|
idx[i] = ide_hwifs[i].present ? 0xff : i;
|
|
|
|
ide_device_add_all(idx);
|
|
|
|
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
|
|
ide_release_lock(); /* for atari only */
|
|
|
|
return 0;
|
|
}
|
|
|
|
module_init(ide_generic_init);
|
|
|
|
MODULE_LICENSE("GPL");
|