misc: Add attribute groups
authorTakashi Iwai <tiwai@suse.de>
Mon, 2 Feb 2015 14:44:54 +0000 (15:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2015 10:44:52 +0000 (11:44 +0100)
commitbd735995308b553cc3c7f6a975aa284b270c7e2c
tree599cbb2f030ab78d8a136b7f00fd16bda2e2f799
parent2f9763190dd6356eec95548f4cfa8a36a71f767c
misc: Add attribute groups

Add groups field to struct miscdevice for passing the attribute groups
at device creation.  In this way, the driver can avoid the manual call
of device_create_file() after the device registration, which is
basically a racy operation, in addition to the reduction of manual
device_remove_file() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/misc.c
include/linux/miscdevice.h