On Wed, May 15, 2013 at 02:13:14PM +0800, Chen Gang wrote:
> 
> In workqueue_sysfs_register(), when failure occurs after called
> device_create_file(), need call device_remove_file() to release the
> related resources, then call device_unregister().
> 
> Or it will cause issue.
> 
> For individual 'device_attributs' (just like our case), need call
> device_remove_file() explictly and then call device_unregister(),
> please reference drivers/base/*.c (e.g node.c or cpu.c).

Hmm... isn't this already taken care of by __sysfs_remove_dir() which
device_unregister() calls?  That function removes all non-directory
files under the directory being removed.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to