[RFCv3 3/7] HSI: method to unregister clients from an hsi port
From: Sebastian Reichel
Date: Sun Oct 06 2013 - 16:30:04 EST
This exports a method to unregister all clients from
an hsi port.
Signed-off-by: Sebastian Reichel <sre@xxxxxxxxxx>
---
drivers/hsi/hsi.c | 10 ++++++++++
include/linux/hsi/hsi.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
index 4384d7e..9dd7120 100644
--- a/drivers/hsi/hsi.c
+++ b/drivers/hsi/hsi.c
@@ -196,6 +196,16 @@ static void hsi_port_release(struct device *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
*/
diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h
index fb07339..89cc6f2 100644
--- a/include/linux/hsi/hsi.h
+++ b/include/linux/hsi/hsi.h
@@ -284,6 +284,7 @@ int hsi_register_controller(struct hsi_controller *hsi);
void hsi_unregister_controller(struct hsi_controller *hsi);
void hsi_add_clients_from_dt(struct hsi_port *port,
struct device_node *clients);
+void hsi_port_unregister_clients(struct hsi_port *port);
static inline void hsi_controller_set_drvdata(struct hsi_controller *hsi,
void *data)
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/