]> git.baikalelectronics.ru Git - kernel.git/commit
staging: most: destroy cdev when channel gets disconnected
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Fri, 7 Apr 2017 13:38:37 +0000 (15:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 10:41:39 +0000 (12:41 +0200)
commit26c0f353998150cd30597859c6add9cd4d78abf7
tree95433779341c40c206ff0e5355233c3af230075d
parentf457ef4d463a1dc319250dca8453eeb3394752aa
staging: most: destroy cdev when channel gets disconnected

When a channel is being removed while an application holds the
corresponding character device, this device is going to be destroyed only
after the application closes the file descriptor and releases character
device. In case the channel appears again before the application closes the
file descriptor it holds, the channel cannot be linked.

This patch changes the described behavior and destroys the character
device at the time the channel get disconnected from the AIM.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c