summaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/dtc2278.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz2007-03-03 17:48:55 +0100
committerBartlomiej Zolnierkiewicz2007-03-03 17:48:55 +0100
commit849138827c962589ac50496fa7feeb2a2d51b467 (patch)
tree3b7988c756068f00ccf8a1440a0f3709a241bcad /drivers/ide/legacy/dtc2278.c
parentide: remove some obsoleted kernel params (v2) (diff)
downloadkernel-qcow2-linux-849138827c962589ac50496fa7feeb2a2d51b467.tar.gz
kernel-qcow2-linux-849138827c962589ac50496fa7feeb2a2d51b467.tar.xz
kernel-qcow2-linux-849138827c962589ac50496fa7feeb2a2d51b467.zip
ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)
Legacy IDE VLB host drivers didn't check for "probe" options when compiled as modules, which was obviously wrong as we don't want module to poke at random I/O ports by simply loading it. Fix it by adding "probe" module param to legacy IDE VLB host drivers. v2: * don't obsolete old "ide0=dtc2278/ht6560b/qd65xx/ali14xx/umc8672" IDE driver options yet (per Alan Cox's request) and enhance documentation Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy/dtc2278.c')
-rw-r--r--drivers/ide/legacy/dtc2278.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index f2903b6e43c0..0219ffa64db6 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -92,7 +92,7 @@ static void tune_dtc2278 (ide_drive_t *drive, u8 pio)
HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
}
-static int __init probe_dtc2278(void)
+static int __init dtc2278_probe(void)
{
unsigned long flags;
ide_hwif_t *hwif, *mate;
@@ -143,10 +143,18 @@ static int __init probe_dtc2278(void)
return 0;
}
+int probe_dtc2278 = 0;
+
+module_param_named(probe, probe_dtc2278, bool, 0);
+MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets");
+
/* Can be called directly from ide.c. */
int __init dtc2278_init(void)
{
- if (probe_dtc2278()) {
+ if (probe_dtc2278 == 0)
+ return -ENODEV;
+
+ if (dtc2278_probe()) {
printk(KERN_ERR "dtc2278: ide interfaces already in use!\n");
return -EBUSY;
}