* removing the remaining interfaces.
*/
gb_svc_del(hd->svc);
- gb_interfaces_remove(hd);
device_del(&hd->dev);
}
put_device(&intf->dev);
}
-void gb_interfaces_remove(struct gb_host_device *hd)
-{
- struct gb_interface *intf, *temp;
-
- list_for_each_entry_safe(intf, temp, &hd->interfaces, links)
- gb_interface_remove(intf);
-}
-
/*
* Intialise an interface by enabling the control connection and fetching the
* manifest and other information over it.
int gb_interface_init(struct gb_interface *intf);
int gb_interface_add(struct gb_interface *intf);
void gb_interface_remove(struct gb_interface *intf);
-void gb_interfaces_remove(struct gb_host_device *hd);
#endif /* __INTERFACE_H */
return 0;
}
+static void gb_svc_remove_interfaces(struct gb_svc *svc)
+{
+ struct gb_interface *intf, *tmp;
+
+ list_for_each_entry_safe(intf, tmp, &svc->hd->interfaces, links)
+ gb_interface_remove(intf);
+}
+
void gb_svc_del(struct gb_svc *svc)
{
gb_connection_disable(svc->connection);
}
flush_workqueue(svc->wq);
+
+ gb_svc_remove_interfaces(svc);
}
void gb_svc_put(struct gb_svc *svc)