Skip to content

Commit dbdec83

Browse files
committed
ide-generic: minor fix for mips
Move ide_probe_legacy() call to ide_generic_init() so it fails early if necessary and returns the proper error value (nowadays ide_default_io_base() is used only by ide-generic). Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent ac32f32 commit dbdec83

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/ide/ide-generic.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ static int __init ide_generic_init(void)
8787
unsigned long io_addr;
8888
int i, rc;
8989

90+
#ifdef CONFIG_MIPS
91+
if (!ide_probe_legacy())
92+
return -ENODEV;
93+
#endif
9094
printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
9195
"parameter for probing all legacy ISA IDE ports\n");
9296

‎include/asm-mips/mach-generic/ide.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ static __inline__ int ide_default_irq(unsigned long base)
7272

7373
static __inline__ unsigned long ide_default_io_base(int index)
7474
{
75-
if (!ide_probe_legacy())
76-
return 0;
7775
/*
7876
* If PCI is present then it is not safe to poke around
7977
* the other legacy IDE ports. Only 0x1f0 and 0x170 are

0 commit comments

Comments
 (0)