/*
* Tear down a previously set up module.
*/
-static void interface_destroy(struct gb_interface *intf)
+void gb_interface_remove(struct gb_interface *intf)
{
struct gb_module *module;
struct gb_bundle *bundle;
put_device(&module->dev);
}
+void gb_interfaces_remove(struct greybus_host_device *hd)
+{
+ struct gb_interface *intf, *temp;
+
+ list_for_each_entry_safe(intf, temp, &hd->interfaces, links)
+ gb_interface_remove(intf);
+}
+
/**
* gb_interface_init
*
kfree(manifest);
return ret;
}
-
-void gb_interface_remove(struct greybus_host_device *hd, u8 interface_id)
-{
- struct gb_interface *intf = gb_interface_find(hd, interface_id);
-
- if (intf)
- interface_destroy(intf);
- else
- dev_err(hd->parent, "interface id %d not found\n",
- interface_id);
-}
-
-void gb_interfaces_remove(struct greybus_host_device *hd)
-{
- struct gb_interface *intf, *temp;
-
- list_for_each_entry_safe(intf, temp, &hd->interfaces, links)
- interface_destroy(intf);
-}
u8 interface_id);
void gb_interface_destroy(struct gb_interface *intf);
int gb_interface_init(struct gb_interface *intf, u8 device_id);
-void gb_interface_remove(struct greybus_host_device *hd, u8 interface_id);
+void gb_interface_remove(struct gb_interface *intf);
void gb_interfaces_remove(struct greybus_host_device *hd);
int gb_create_bundle_connection(struct gb_interface *intf, u8 class);
u8 device_id;
device_id = intf->device_id;
- gb_interface_remove(hd, intf_id);
+ gb_interface_remove(intf);
/*
* Destroy the two-way route between the AP and the interface.
ida_put:
ida_simple_remove(&svc->device_id_map, device_id);
destroy_interface:
- gb_interface_remove(hd, intf_id);
+ gb_interface_remove(intf);
free_svc_hotplug:
kfree(svc_hotplug);
}