Re: [PATCH V2] staging: dgnc: Creating and destroying sysfs files properly

2015-12-21 Thread Salah Triki
Hi, How to decide if an information should be exported or not to user space ? best regards -- salah triki On Mon, Dec 21, 2015 at 03:52:26PM -0800, Greg KH wrote: > On Fri, Dec 18, 2015 at 11:57:18AM +0100, Salah Triki wrote: > > Delegate creation and destruction of sysfs files to device > >

Re: [PATCH V2] staging: dgnc: Creating and destroying sysfs files properly

2015-12-21 Thread Greg KH
On Fri, Dec 18, 2015 at 11:57:18AM +0100, Salah Triki wrote: > Delegate creation and destruction of sysfs files to device > and driver layers in order to eliminate races. Why are these files even present at all? They should not be needed, and can be removed instead. thanks, greg k-h

Re: [PATCH V2] staging: dgnc: Creating and destroying sysfs files properly

2015-12-21 Thread Greg KH
On Tue, Dec 22, 2015 at 01:43:54AM +0100, Salah Triki wrote: > Hi, > > How to decide if an information should be exported or not to user space ? Why does no other serial driver need this? Odds are, there are already other ways to get this information and the driver authors were just "lazy" or

[PATCH V2] staging: dgnc: Creating and destroying sysfs files properly

2015-12-18 Thread Salah Triki
Delegate creation and destruction of sysfs files to device and driver layers in order to eliminate races. Signed-off-by: Salah Triki --- drivers/staging/dgnc/dgnc_driver.c | 11 ++-- drivers/staging/dgnc/dgnc_sysfs.c | 118 ++---