Staging: batman-adv: Wrapper functions for sysfs storing
authorLinus Lüssing <linus.luessing@web.de>
Sun, 21 Nov 2010 23:55:53 +0000 (00:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Nov 2010 19:09:11 +0000 (11:09 -0800)
commitadd9e1722755072f40d79104db04e350b25624d9
tree358cbc7885da880c008c053d54801b405a1d06e9
parent641ee3f8f4375bde4e216aacd26d286a34efed61
Staging: batman-adv: Wrapper functions for sysfs storing

Sysfs configuration options that just took a boolean value
(enable(d)/disable(d)/0/1) and integer setting basically all had the same
structure.

To avoid even more copy and pasting in the future and to make introducing
new configuration parameters for batman-adv simpler, more generic
wrapper functions are being introduced with this commit. They can deal with
boolean and unsigned integer parameters, storing them in the specified
atomic_t variables.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/bat_sysfs.c