Commit a0bf37ed authored by Sebastian Reichel's avatar Sebastian Reichel

HSI: method to unregister clients from an hsi port

This exports a method to unregister all clients from
an hsi port.
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
Reviewed-by: default avatarPavel Machek <pavel@ucw.cz>
Tested-By: default avatarIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
parent 84d93b5e
......@@ -129,6 +129,16 @@ static void hsi_port_release(struct device *dev)
kfree(to_hsi_port(dev));
}
/**
* hsi_unregister_port - Unregister an HSI port
* @port: The HSI port to unregister
*/
void hsi_port_unregister_clients(struct hsi_port *port)
{
device_for_each_child(&port->device, NULL, hsi_remove_client);
}
EXPORT_SYMBOL_GPL(hsi_port_unregister_clients);
/**
* hsi_unregister_controller - Unregister an HSI controller
* @hsi: The HSI controller to register
......
......@@ -282,6 +282,7 @@ struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags);
void hsi_put_controller(struct hsi_controller *hsi);
int hsi_register_controller(struct hsi_controller *hsi);
void hsi_unregister_controller(struct hsi_controller *hsi);
void hsi_port_unregister_clients(struct hsi_port *port);
static inline void hsi_controller_set_drvdata(struct hsi_controller *hsi,
void *data)
......
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