[media] lirc: use refcounting for lirc devices
authorSean Young <sean@mess.org>
Mon, 30 Jan 2017 15:49:58 +0000 (13:49 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 24 Mar 2017 11:27:07 +0000 (08:27 -0300)
commit74c839b2f5544fd77fdb34a99b577965d4812edf
treec3eccff4c63588d72c16b31ba185e9dfb856fe0a
parent069f3b10aed966b2da6bb1161af41da0e8880724
[media] lirc: use refcounting for lirc devices

If a lirc device is unplugged, the struct rc_dev is freed even though
userspace can still have a file descriptor open on the lirc chardev. The
rc_dev structure can be used in a subsequent, or even currently executing
ioctl, read or write.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/lirc_dev.c