From: Bartlomiej Zolnierkiewicz Date: Sun, 10 Feb 2008 23:32:13 +0000 (+0100) Subject: palm_bk3710: port initialization/probing bugfix X-Git-Tag: v2.6.25-rc2~93^2~12 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c92a7f1d8254fabd99df33af59094935fc2cfe32;p=linux-2.6-omap-h63xx.git palm_bk3710: port initialization/probing bugfix Probe port _after_ it is fully initialized. Cc: Anton Salnikov Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 0ce95c1ba7e..8e40bdbc397 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -370,13 +370,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) ide_init_port_hw(hwif, &hw); hwif->quirkproc = NULL; - idx[0] = i; - - ide_device_add(idx, NULL); - - if (!hwif->present) - goto out; - hwif->set_pio_mode = &palm_bk3710_set_pio_mode; hwif->set_dma_mode = &palm_bk3710_set_dma_mode; hwif->mmio = 1; @@ -390,6 +383,13 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) ide_setup_dma(hwif, mem->start); + idx[0] = i; + + ide_device_add(idx, NULL); + + if (!hwif->present) + goto out; + return 0; out: printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");