lkml.org 
[lkml]   [2014]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv5 01/10] HSI: method to unregister clients from an hsi port
    Date
    This exports a method to unregister all clients from
    an hsi port.

    Signed-off-by: Sebastian Reichel <sre@kernel.org>
    Reviewed-by: Pavel Machek <pavel@ucw.cz>
    Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
    ---
    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 749f7b5..e96a987 100644
    --- a/drivers/hsi/hsi.c
    +++ b/drivers/hsi/hsi.c
    @@ -130,6 +130,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 39bfd5b..5a9f121 100644
    --- a/include/linux/hsi/hsi.h
    +++ b/include/linux/hsi/hsi.h
    @@ -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)
    --
    2.0.0.rc0


    \
     
     \ /
      Last update: 2014-05-10 19:21    [W:4.554 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site