History

[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).

David Härdeman committed 9 years ago

Commit b145ef91 parent 615cd3f3 files · +19 −21Browse files

Showing the changes to include/media/lirc_dev.h (1 of 3 files). Show all

Unified · Split

include/media/lirc_dev.h+5−4
@@ -121,13 +121,14 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 120 unmodified lines
121121 *
122122 * @code_length: length of the remote control key code expressed in bits.
123123 *
124− * @buffer_size: Number of FIFO buffers with @chunk_size size. If zero,
125− * creates a buffer with BUFLEN size (16 bytes).
126− *
127124 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
128125 * LIRC_CAN\_\*, as defined at include/media/lirc.h.
129126 *
127+ * @buffer_size: Number of FIFO buffers with @chunk_size size.
128+ * Only used if @rbuf is NULL.
129+ *
130130 * @chunk_size: Size of each FIFO buffer.
131+ * Only used if @rbuf is NULL.
131132 *
132133 * @data: it may point to any driver data and this pointer will
133134 * be passed to all callback functions.
@@ -162,9 +163,9 @@ struct lirc_driver { · 28 unmodified lines
162163 char name[40];
163164 unsigned int minor;
164165 __u32 code_length;
165− unsigned int buffer_size; /* in chunks holding one code each */
166166 __u32 features;
167167
168+ unsigned int buffer_size; /* in chunks holding one code each */
168169 unsigned int chunk_size;
169170
170171 void *data;