lkml.org 
[lkml]   [2006]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[RFC 1/4] firewire: node interface
    From
    Date
    This patch adds just two small helper functions to allow other code to
    register a struct class_interface to interface node entries.

    diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
    index 082c7fd..06f4544 100644
    --- a/drivers/ieee1394/nodemgr.c
    +++ b/drivers/ieee1394/nodemgr.c
    @@ -1796,3 +1796,11 @@ void cleanup_ieee1394_nodemgr(void)
    class_unregister(&nodemgr_ud_class);
    class_unregister(&nodemgr_ne_class);
    }
    +
    +int hpsb_register_node_interface(struct class_interface *intf)
    +{
    + intf->class = &nodemgr_ne_class;
    +
    + return class_interface_register(intf);
    +}
    +EXPORT_SYMBOL_GPL(hpsb_register_node_interface);
    diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h
    index 0b26616..d779f81 100644
    --- a/drivers/ieee1394/nodemgr.h
    +++ b/drivers/ieee1394/nodemgr.h
    @@ -170,6 +170,14 @@ int hpsb_node_write(struct node_entry *n
    int hpsb_node_lock(struct node_entry *ne, u64 addr,
    int extcode, quadlet_t *data, quadlet_t arg);

    +/*
    + * things like mem1394 are interfaces to nodes, thus
    + * allow them to register and unregister one.
    + */
    +int hpsb_register_node_interface(struct class_interface *intf);
    +static inline void hpsb_unregister_node_interface(struct class_interface *intf) {
    + class_interface_unregister(intf);
    +}

    /* Iterate the hosts, calling a given function with supplied data for each
    * host. */

    -
    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/

    \
     
     \ /
      Last update: 2006-02-02 23:40    [from the cache]
    ©2003-2011 Jasper Spaans. Advertise on this site