]> 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)
commit1b7d245c8c9de94ad80a979f85c98975b2b0e594
tree5d4172db73ed280d54b477d056139de244d873d2
parenta340d8434e46c5a7e8e5133dd37343acb8856164
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