9 #ifndef _LINUX_LIRC_DEV_H
10 #define _LINUX_LIRC_DEV_H
12 #define MAX_IRCTL_DEVICES 8
15 #define mod(n, div) ((n) % (div))
17 #include <linux/slab.h>
20 #include <linux/poll.h>
42 spin_unlock_irqrestore(&buf->
fifo_lock, flags);
44 WARN(1,
"calling %s on an uninitialized lirc_buffer\n",
49 unsigned int chunk_size,
65 static inline void lirc_buffer_free(
struct lirc_buffer *buf)
71 WARN(1,
"calling %s on an uninitialized lirc_buffer\n",
75 static inline int lirc_buffer_len(
struct lirc_buffer *buf)
82 spin_unlock_irqrestore(&buf->
fifo_lock, flags);
87 static inline int lirc_buffer_full(
struct lirc_buffer *buf)
92 static inline int lirc_buffer_empty(
struct lirc_buffer *buf)
94 return !lirc_buffer_len(buf);
97 static inline int lirc_buffer_available(
struct lirc_buffer *buf)
102 static inline unsigned int lirc_buffer_read(
struct lirc_buffer *buf,
105 unsigned int ret = 0;
114 static inline unsigned int lirc_buffer_write(
struct lirc_buffer *buf,
223 size_t length, loff_t *ppos);