]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Build sysfs entries with static attribute groups
authorTakashi Iwai <tiwai@suse.de>
Fri, 30 Jan 2015 19:29:31 +0000 (20:29 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 2 Feb 2015 20:01:51 +0000 (20:01 +0000)
commit0a33b9fd0bc56babbdc3f24e112d7bb658429bd4
tree3d98fc2cefaeb33c3208813e64765204d26b6ab8
parentcf936b4b6b93cc804c22eeb6e2802a77cb92b3e4
regulator: Build sysfs entries with static attribute groups

Instead of calling device_create_file() manually after the device
registration, put all in attribute groups and filter the unwanted ones
via is_visible callback.  This not only simplifies the code but also
avoids the possible race between the device registration and sysfs
registration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c