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
121 *121 *
122 * @code_length: length of the remote control key code expressed in bits.122 * @code_length: length of the remote control key code expressed in bits.
123 *123 *
124 * @buffer_size: Number of FIFO buffers with @chunk_size size. If zero,
125 * creates a buffer with BUFLEN size (16 bytes).
126 *
127 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,124 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
128 * LIRC_CAN\_\*, as defined at include/media/lirc.h.125 * LIRC_CAN\_\*, as defined at include/media/lirc.h.
129 *126 *
127 * @buffer_size: Number of FIFO buffers with @chunk_size size.
128 * Only used if @rbuf is NULL.
129 *
130 * @chunk_size: Size of each FIFO buffer.130 * @chunk_size: Size of each FIFO buffer.
131 * Only used if @rbuf is NULL.
131 *132 *
132 * @data: it may point to any driver data and this pointer will133 * @data: it may point to any driver data and this pointer will
133 * be passed to all callback functions.134 * be passed to all callback functions.
@@ -162,9 +163,9 @@ struct lirc_driver { · 28 unmodified lines
162 char name[40];163 char name[40];
163 unsigned int minor;164 unsigned int minor;
164 __u32 code_length;165 __u32 code_length;
165 unsigned int buffer_size; /* in chunks holding one code each */
166 __u32 features;166 __u32 features;
167 167
168 unsigned int buffer_size; /* in chunks holding one code each */
168 unsigned int chunk_size;169 unsigned int chunk_size;
169 170
170 void *data;171 void *data;