[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E29B6B1.2090107@cam.ac.uk>
Date: Fri, 22 Jul 2011 18:43:13 +0100
From: Jonathan Cameron <jic23@....ac.uk>
To: LKML <linux-kernel@...r.kernel.org>, Greg KH <greg@...ah.com>
Subject: Sysfs - export sysfs_create_subdir?
Hi All,
I have a couple of cases in IIO where under some conditions
we end up using dummy attr_groups (no elements) to initialize
a sub directory before dynamically creating all of its attributes.
Now having dummy groups in the IIO core is fine, but it does seem
a little messy.
The obvious choice would be to put together a small wrapper function
for sysfs_create_subdir that also does sysfs_get on the result.
Anyone have any strong feelings on whether this is worthwhile or not?
It'll save me about 16 lines of code, so not exactly a big point,
but nice to get it right none the less!
If there is a way of doing this cleanly that I'm missing, then sorry
for the noise and please tell me what it is!
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists