Commit 6ee600bf authored by Gerd Bayer's avatar Gerd Bayer Committed by Heiko Carstens

s390/pci: remove hotplug slot when releasing the device

Centralize the removal so all paths are covered and the hotplug slot
will remain active until the device is really destroyed.
Signed-off-by: default avatarGerd Bayer <gbayer@linux.ibm.com>
Reviewed-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent bcb5d6c7
......@@ -906,8 +906,6 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
*/
void zpci_device_reserved(struct zpci_dev *zdev)
{
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);
/*
* Remove device from zpci_list as it is going away. This also
* makes sure we ignore subsequent zPCI events for this device.
......@@ -925,6 +923,9 @@ void zpci_release_device(struct kref *kref)
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
int ret;
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);
if (zdev->zbus->bus)
zpci_bus_remove_device(zdev, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment