ide: factor out code for tuning devices from ide_probe_port()

* Factor out code for tuning devices from ide_probe_port()
to ide_port_tune_devices().

* Move ide_port_tune_devices() call from ide_probe_port()
to ide_device_add_all().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

+12 -3
+12 -3
drivers/ide/ide-probe.c
··· 794 794 if (!hwif->present) 795 795 return -ENODEV; 796 796 797 + return 0; 798 + } 799 + 800 + static void ide_port_tune_devices(ide_hwif_t *hwif) 801 + { 802 + int unit; 803 + 797 804 for (unit = 0; unit < MAX_DRIVES; unit++) { 798 805 ide_drive_t *drive = &hwif->drives[unit]; 799 806 ··· 834 827 else 835 828 drive->no_io_32bit = drive->id->dword_io ? 1 : 0; 836 829 } 837 - 838 - return 0; 839 830 } 840 831 841 832 #if MAX_HWIFS > 1 ··· 1314 1309 continue; 1315 1310 } 1316 1311 1317 - if (ide_probe_port(hwif) < 0) 1312 + if (ide_probe_port(hwif) < 0) { 1318 1313 ide_hwif_release_regions(hwif); 1314 + continue; 1315 + } 1316 + 1317 + ide_port_tune_devices(hwif); 1319 1318 } 1320 1319 1321 1320 for (i = 0; i < MAX_HWIFS; i++) {