Re: [PATCH 3/4] ptp: use is_visible method to hide unused attributes

2017-02-14 Thread Richard Cochran
On Tue, Feb 14, 2017 at 10:07:47AM -0800, Dmitry Torokhov wrote: > > At first glance, this patch and the next look like nice improvements. > > I don't futz around with sysfs code very often, and so may I ask how > > or whether you tested it? > > I used the hack below. OK, thats fine. I'll be

Re: [PATCH 3/4] ptp: use is_visible method to hide unused attributes

2017-02-14 Thread Dmitry Torokhov
Hi Richard, On Tue, Feb 14, 2017 at 09:42:26AM +0100, Richard Cochran wrote: > On Mon, Feb 13, 2017 at 07:51:07PM -0800, Dmitry Torokhov wrote: > > Instead of creating selected attributes after the device is created (and > > after userspace potentially seen uevent), lets use attribute group > >

Re: [PATCH 3/4] ptp: use is_visible method to hide unused attributes

2017-02-14 Thread Richard Cochran
On Mon, Feb 13, 2017 at 07:51:07PM -0800, Dmitry Torokhov wrote: > 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

[PATCH 3/4] ptp: use is_visible method to hide unused attributes

2017-02-13 Thread Dmitry Torokhov
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