Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754394Ab3JFU20 (ORCPT ); Sun, 6 Oct 2013 16:28:26 -0400 Received: from ring0.de ([91.143.88.219]:45474 "EHLO smtp.ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883Ab3JFU2W (ORCPT ); Sun, 6 Oct 2013 16:28:22 -0400 X-Spam-Report: * -1.9 BAYES_00 BODY: Spamwahrscheinlichkeit nach Bayes-Test: 0-1% * [score: 0.0000] From: Sebastian Reichel To: Sebastian Reichel , Linus Walleij , Shubhrajyoti Datta , Carlos Chinea , Paul Walmsley Cc: Kevin Hilman , Tony Lindgren , Russell King , Grant Likely , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , =?UTF-8?q?=27Beno=C3=AEt=20Cousson=27?= , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, =?UTF-8?q?=27Pali=20Roh=C3=A1r=27?= , =?UTF-8?q?=27=D0=98=D0=B2=D0=B0=D0=B9=D0=BB=D0=BE=20=D0=94=D0=B8=D0=BC=D0=B8=D1=82=D1=80=D0=BE=D0=B2=27?= , Joni Lapilainen , Sebastian Reichel Subject: [RFCv3 3/7] HSI: method to unregister clients from an hsi port Date: Sun, 6 Oct 2013 22:27:11 +0200 Message-Id: <1381091235-18293-4-git-send-email-sre@debian.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381091235-18293-1-git-send-email-sre@debian.org> References: <1381091235-18293-1-git-send-email-sre@debian.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1619 Lines: 50 This exports a method to unregister all clients from an hsi port. Signed-off-by: Sebastian Reichel --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/