lkml.org 
[lkml]   [2005]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH, RFC 2/3] Use sem_getcount in ieee1394

    Convert 1394's node manager to use sem_getcount instead of nasty hack.
    Tested on parisc (where it eliminates a warning), ia64, i386.

    Signed-off-by: Jody McIntyre <scjody@modernduck.com>

    Index: 1394-dev/drivers/ieee1394/nodemgr.c
    ===================================================================
    --- 1394-dev.orig/drivers/ieee1394/nodemgr.c 2005-03-08 16:50:40.000000000 -0500
    +++ 1394-dev/drivers/ieee1394/nodemgr.c 2005-03-08 16:51:07.000000000 -0500
    @@ -284,7 +284,7 @@ static DEVICE_ATTR(bus_options,S_IRUGO,f
    static ssize_t fw_show_ne_tlabels_free(struct device *dev, char *buf)
    {
    struct node_entry *ne = container_of(dev, struct node_entry, device);
    - return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1);
    + return sprintf(buf, "%d\n", sem_getcount(&ne->tpool->count) + 1);
    }
    static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL);

    -
    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: 2005-03-22 14:11    [W:0.022 / U:30.452 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site