Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: ide_unregister() locking bugfix
ide: ide_unregister() warm-plug bugfix
ide: fix hwif->gendev refcounting

+9 -19
-2
drivers/ide/ide-probe.c
··· 646 646 goto out; 647 647 } 648 648 649 - get_device(&hwif->gendev); 650 - 651 649 hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, 652 650 MKDEV(0, 0), hwif, hwif->name); 653 651 if (IS_ERR(hwif->portdev)) {
+9 -17
drivers/ide/ide.c
··· 315 315 316 316 BUG_ON(in_interrupt()); 317 317 BUG_ON(irqs_disabled()); 318 - mutex_lock(&ide_cfg_mtx); 319 - spin_lock_irq(&ide_lock); 320 - if (!hwif->present) 321 - goto abort; 322 - __ide_port_unregister_devices(hwif); 323 - hwif->present = 0; 324 318 319 + mutex_lock(&ide_cfg_mtx); 320 + 321 + spin_lock_irq(&ide_lock); 322 + if (hwif->present) { 323 + __ide_port_unregister_devices(hwif); 324 + hwif->present = 0; 325 + } 325 326 spin_unlock_irq(&ide_lock); 326 327 327 328 ide_proc_unregister_port(hwif); ··· 352 351 blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS); 353 352 kfree(hwif->sg_table); 354 353 unregister_blkdev(hwif->major, hwif->name); 355 - spin_lock_irq(&ide_lock); 356 354 357 355 if (hwif->dma_base) 358 356 ide_release_dma_engine(hwif); 359 357 358 + spin_lock_irq(&ide_lock); 360 359 /* restore hwif data to pristine status */ 361 360 ide_init_port_data(hwif, hwif->index); 362 - 363 - abort: 364 361 spin_unlock_irq(&ide_lock); 362 + 365 363 mutex_unlock(&ide_cfg_mtx); 366 364 } 367 365 ··· 1094 1094 1095 1095 EXPORT_SYMBOL_GPL(ide_bus_type); 1096 1096 1097 - static void ide_port_class_release(struct device *portdev) 1098 - { 1099 - ide_hwif_t *hwif = dev_get_drvdata(portdev); 1100 - 1101 - put_device(&hwif->gendev); 1102 - } 1103 - 1104 1097 int ide_vlb_clk; 1105 1098 EXPORT_SYMBOL_GPL(ide_vlb_clk); 1106 1099 ··· 1298 1305 ret = PTR_ERR(ide_port_class); 1299 1306 goto out_port_class; 1300 1307 } 1301 - ide_port_class->dev_release = ide_port_class_release; 1302 1308 1303 1309 init_ide_data(); 1304 1310