diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 9c6e9bb..e66b498 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -285,21 +285,34 @@ msi_bus_store(struct device *dev, struct device_attribute
*attr,
 }

 static DEFINE_MUTEX(pci_remove_rescan_mutex);
+
+static void bus_rescan_callback(struct device *dev)
+{
+	struct pci_bus *b = NULL;
+
+	mutex_lock(&pci_remove_rescan_mutex);
+	while ((b = pci_find_next_bus(b)) != NULL)
+		pci_rescan_bus(b);
+	mutex_unlock(&pci_remove_rescan_mutex);
+}
+
 static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
 				size_t count)
 {
+	int err;
 	unsigned long val;
-	struct pci_bus *b = NULL;
+	struct device *dev = bus->dev_root;

 	if (strict_strtoul(buf, 0, &val) < 0)
 		return -EINVAL;

-	if (val) {
-		mutex_lock(&pci_remove_rescan_mutex);
-		while ((b = pci_find_next_bus(b)) != NULL)
-			pci_rescan_bus(b);
-		mutex_unlock(&pci_remove_rescan_mutex);
-	}
+	if (!val)
+		return count;
+
+	err = device_schedule_callback(dev, bus_rescan_callback);
+	if (err)
+		return err;
+
 	return count;
 }
