summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2017-06-25 09:31:45 -0300
committerTao Huang <huangtao@rock-chips.com>2018-12-10 20:36:20 +0800
commite883d1aca1083a34b611a82d544e3e31db91da05 (patch)
tree9d5833f553cea7d9fef31cd08234778797471565 /include
parent6f62f1f22febb81ef5d86eaccc1fb1929a63ed10 (diff)
UPSTREAM: [media] media: lirc_dev: make chunk_size and buffer_size mandatory
Make setting chunk_size and buffer_size mandatory for drivers which expect lirc_dev to allocate the lirc_buffer (i.e. ir-lirc-codec) and don't set them in lirc-zilog (which creates its own buffer). Also remove an unnecessary copy of chunk_size in struct irctl (the same information is already available from struct lirc_buffer). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> (cherry picked from commit b145ef94f63e02c2615ffde61a376b53f3367bc6) Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/lirc_dev.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
index 050cb53b89c0..aeeb4045da90 100644
--- a/include/media/lirc_dev.h
+++ b/include/media/lirc_dev.h
@@ -128,13 +128,14 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
*
* @code_length: length of the remote control key code expressed in bits.
*
- * @buffer_size: Number of FIFO buffers with @chunk_size size. If zero,
- * creates a buffer with BUFLEN size (16 bytes).
- *
* @features: lirc compatible hardware features, like LIRC_MODE_RAW,
* LIRC_CAN\_\*, as defined at include/media/lirc.h.
*
+ * @buffer_size: Number of FIFO buffers with @chunk_size size.
+ * Only used if @rbuf is NULL.
+ *
* @chunk_size: Size of each FIFO buffer.
+ * Only used if @rbuf is NULL.
*
* @data: it may point to any driver data and this pointer will
* be passed to all callback functions.
@@ -169,9 +170,9 @@ struct lirc_driver {
char name[40];
unsigned int minor;
__u32 code_length;
- unsigned int buffer_size; /* in chunks holding one code each */
__u32 features;
+ unsigned int buffer_size; /* in chunks holding one code each */
unsigned int chunk_size;
void *data;