Hi Patrick,
I'll grab 2.5.31 when it comes out and play with it.
Personally, I would get rid of the "strname" (make it implied by the variable
name), and use type instead of show & store, eg:
DEVICE_ATTR(frobbable, O_RDWR, int);
This means you can (1) check that frobbable is actually an int at compile
time (__check_int), (2) you can use __show_int and __store_int as standard
routines, and (3) you can use your own types by:
#define __check_frobbable_t(x) ((void)((&x) == (frobbable_t *)0)
/* Define show_frobbable and store_frobbable here */
DEVICE_ATTR(frobbable, O_RDWR, frobbable_t);
This ties into alot of other projects such as event logging, etc.
Rusty.
PS. yeah yeah, I'll send code RSN.
-- there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy - 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/