palm_bk3710: port initialization/probing bugfix
PATCH 1/1 palm_bk3710: port initialization/probing bugfix
Probe port _after_ it is fully initialized.
Cc Anton Salnikov <[email protected]>
Cc Sergei Shtylyov <[email protected]>
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
--- drivers/ide/arm/palm_bk3710.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/ide/arm/palm_bk3710.c +7 -7
@@ -370,13 +370,6 @@ static int __devinit palm_bk3710_probe(side_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(side_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" );
Quoted 1 line · Bartlomiej Zolnierkiewicz
Probe port _after_ it is fully initialized.
Hm, I thought the usual sequence is vice versa: you first probe and then
initialize. :-)
Quoted 3 lines
Cc Anton Salnikov <[email protected]>Cc Sergei Shtylyov <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Acked-by Sergei Shtylyov <[email protected]>
MBR, Sergei