openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/sysfsutils/2.1.0-r5/sysfsutils-2.1.0/lib/sysfs_device.c
void sysfs_close_device(struct sysfs_device* dev)
{
    if (dev)
    {
        if (dev->parent)
            sysfs_close_device(dev->parent);
        if (dev->children && dev->children->count)
            dlist_destroy(dev->children);
        if (dev->attrlist)
            dlist_destroy(dev->attrlist);
        free(dev);
    }
}
/**
 * sysfs_close_device: closes and cleans up a device
 * @dev = device to clean up
 */
closes and cleans up a device
@dev = device to clean up
closes and cleans up a device @dev = device to clean up
void sysfs_close_device(struct sysfs_device* dev)
{
    if (dev)
    {
        if (dev->parent)
            sysfs_close_device(dev->parent);
        if (dev->children && dev->children->count)
            dlist_destroy(dev->children);
        if (dev->attrlist)
            dlist_destroy(dev->attrlist);
        free(dev);
    }
}
void sysfs_close_device ( struct sysfs_device * dev ) { if ( dev ) { if ( dev -> parent ) sysfs_close_device ( dev -> parent ) ; if ( dev -> children && dev -> children -> count ) dlist_destroy ( dev -> children ) ; if ( dev -> attrlist ) dlist_destroy ( dev -> attrlist ) ; free ( dev ) ; } }
sysfs_close_device: closes and cleans up a device
 @dev = device to clean up
sysfs_close_device : closes and cleans up a device @dev = device to clean up