]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: use is_visible method to hide unused attributes
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 14 Feb 2017 18:23:33 +0000 (10:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 16:03:06 +0000 (11:03 -0500)
commitd767b72db948a9de13928f48f82ac7104ff922b8
tree5d4172db73ed280d54b477d056139de244d873d2
parent09b4cc8a95e2ce9b61e461572dec9a3a30e4d64f
ptp: use is_visible method to hide unused attributes

Instead of creating selected attributes after the device is created (and
after userspace potentially seen uevent), lets use attribute group
is_visible() method to control which attributes are shown. This will allow
us to create all attributes (except "pins" group, which will be taken care
of later) before userspace gets notified about new ptp class device.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_sysfs.c