]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:15:32 +0000 (08:15 +0200)
commit6347abb820bbbca94074100dbd21f4cbc54d45b2
treeac141372c35f91f6e79b489478d7bbe20a4e1747
parentbca173248fed7477fa607afe0c2efde61f00dbd2
ptp: use is_visible method to hide unused attributes

commit af59e717d5ff9c8dbf9bcc581c0dfb3b2a9c9030 upstream.

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>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ptp/ptp_sysfs.c