diff options
author | Martin Kaiser <martin@kaiser.cx> | 2014-10-28 18:51:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 12:53:05 -0200 |
commit | 77d381af73e905c48b992d5d8426376469bc9576 (patch) | |
tree | f957c84c6f10aed179e201ea1234e64825fd8e05 /drivers/staging/media | |
parent | 373145282ea61c2a01980914ee5bbff7cf62afd6 (diff) |
[media] lirc: use kfifo_initialized() on lirc_buffer's fifo
We can use kfifo_initialized() to check if the fifo in lirc_buffer is
initialized or not. There's no need to have a dedicated fifo status
variable in lirc_buffer.
[m.chehab@samsung.com: add the same change to lirc_zilog, to avoid
breaking compilation of staging drivers]
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/lirc/lirc_zilog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index 567feba0011c..1ccf6262ab36 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -199,7 +199,7 @@ static void release_ir_device(struct kref *ref) lirc_unregister_driver(ir->l.minor); ir->l.minor = MAX_IRCTL_DEVICES; } - if (ir->rbuf.fifo_initialized) + if (kfifo_initialized(&ir->rbuf.fifo)) lirc_buffer_free(&ir->rbuf); list_del(&ir->list); kfree(ir); |