Store the cdev pointer in struct irctl, allocated dynamically as needed, rather than having a static array. At the same time, recycle some of the saved memory to nudge the maximum number of lirc devices supported up a ways -- its not that uncommon these days, now that we have the rc-core lirc bridge driver, to see a system with at least 4 raw IR receivers. (consider a mythtv backend with several video capture devices and the possible need for IR transmit hardware).
Showing the changes to include/media/lirc_dev.h (1 of 2 files). Show all
Unified · Split
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | #ifndef _LINUX_LIRC_DEV_H | 9 | #ifndef _LINUX_LIRC_DEV_H |
| 10 | #define _LINUX_LIRC_DEV_H | 10 | #define _LINUX_LIRC_DEV_H |
| 11 | 11 | ||
| 12 | #define MAX_IRCTL_DEVICES 4 | 12 | #define MAX_IRCTL_DEVICES 8 |
| 13 | #define BUFLEN 16 | 13 | #define BUFLEN 16 |
| 14 | 14 | ||
| 15 | #define mod(n, div) ((n) % (div)) | 15 | #define mod(n, div) ((n) % (div)) |