@@ -454,6 +454,8 @@ static int pcie_port_probe_service(struct device *dev)
if (status)
return status;
+ list_add_tail(&pciedev->slist, &pciedev->port->service_list);
+
get_device(dev);
return 0;
}
@@ -477,6 +479,9 @@ static int pcie_port_remove_service(struct device *dev)
pciedev = to_pcie_device(dev);
driver = to_service_driver(dev->driver);
+
+ list_del(&pciedev->slist);
+
if (driver && driver->remove) {
driver->remove(pciedev);
put_device(dev);
@@ -31,6 +31,7 @@ struct pcie_device {
u32 service; /* Port service this device represents */
void *priv_data; /* Service Private Data */
struct device device; /* Generic Device Interface */
+ struct list_head slist; /* List of services */
};
#define to_pcie_device(d) container_of(d, struct pcie_device, device)
This patch adds and removes the port service to the service list. Signed-off-by: Oza Pawandeep <poza@codeaurora.org>