/* cancel the pending probing work */
chip = card->private_data;
hda = container_of(chip, struct hda_intel, chip);
- /* FIXME: below is an ugly workaround.
- * Both device_release_driver() and driver_probe_device()
- * take *both* the device's and its parent's lock before
- * calling the remove() and probe() callbacks. The codec
- * probe takes the locks of both the codec itself and its
- * parent, i.e. the PCI controller dev. Meanwhile, when
- * the PCI controller is unbound, it takes its lock, too
- * ==> ouch, a deadlock!
- * As a workaround, we unlock temporarily here the controller
- * device during cancel_work_sync() call.
- */
- device_unlock(&pci->dev);
cancel_delayed_work_sync(&hda->probe_work);
- device_lock(&pci->dev);
clear_bit(chip->dev_index, probed_devs);
pci_set_drvdata(pci, NULL);