This is in preparation for the later patches which do away with struct irctl entirely.
Showing the changes to include/media/lirc_dev.h (1 of 5 files). Show all
Unified · Split
| @@ -111,54 +111,32 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 110 unmodified lines | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | /** | 113 | /** |
| 114 | * struct lirc_driver - Defines the parameters on a LIRC driver | 114 | * struct lirc_dev - represents a LIRC device |
| 115 | * | ||
| 116 | * @name: this string will be used for logs | ||
| 117 | * | ||
| 118 | * @minor: the minor device (/dev/lircX) number for a registered | ||
| 119 | * driver. | ||
| 120 | * | ||
| 121 | * @code_length: length of the remote control key code expressed in bits. | ||
| 122 | * | 115 | * |
| 116 | * @name: used for logging | ||
| 117 | * @minor: the minor device (/dev/lircX) number for the device | ||
| 118 | * @code_length: length of a remote control key code expressed in bits | ||
| 123 | * @features: lirc compatible hardware features, like LIRC_MODE_RAW, | 119 | * @features: lirc compatible hardware features, like LIRC_MODE_RAW, |
| 124 | * LIRC_CAN\_\*, as defined at include/media/lirc.h. | 120 | * LIRC_CAN\_\*, as defined at include/media/lirc.h. |
| 125 | * | ||
| 126 | * @buffer_size: Number of FIFO buffers with @chunk_size size. | 121 | * @buffer_size: Number of FIFO buffers with @chunk_size size. |
| 127 | * Only used if @rbuf is NULL. | 122 | * Only used if @rbuf is NULL. |
| 128 | * | ||
| 129 | * @chunk_size: Size of each FIFO buffer. | 123 | * @chunk_size: Size of each FIFO buffer. |
| 130 | * Only used if @rbuf is NULL. | 124 | * Only used if @rbuf is NULL. |
| 131 | * | 125 | * @data: private per-driver data |
| 132 | * @data: it may point to any driver data and this pointer will | ||
| 133 | * be passed to all callback functions. | ||
| 134 | * | ||
| 135 | * @min_timeout: Minimum timeout for record. Valid only if | 126 | * @min_timeout: Minimum timeout for record. Valid only if |
| 136 | * LIRC_CAN_SET_REC_TIMEOUT is defined. | 127 | * LIRC_CAN_SET_REC_TIMEOUT is defined. |
| 137 | * | ||
| 138 | * @max_timeout: Maximum timeout for record. Valid only if | 128 | * @max_timeout: Maximum timeout for record. Valid only if |
| 139 | * LIRC_CAN_SET_REC_TIMEOUT is defined. | 129 | * LIRC_CAN_SET_REC_TIMEOUT is defined. |
| 140 | * | ||
| 141 | * @rbuf: if not NULL, it will be used as a read buffer, you will | 130 | * @rbuf: if not NULL, it will be used as a read buffer, you will |
| 142 | * have to write to the buffer by other means, like irq's | 131 | * have to write to the buffer by other means, like irq's |
| 143 | * (see also lirc_serial.c). | 132 | * (see also lirc_serial.c). |
| 144 | * | 133 | * @rdev: &struct rc_dev associated with the device |
| 145 | * @rdev: Pointed to struct rc_dev associated with the LIRC | 134 | * @fops: &struct file_operations for the device |
| 146 | * device. | 135 | * @dev: &struct device assigned to the device |
| 147 | * | ||
| 148 | * @fops: file_operations for drivers which don't fit the current | ||
| 149 | * driver model. | ||
| 150 | * Some ioctl's can be directly handled by lirc_dev if the | ||
| 151 | * driver's ioctl function is NULL or if it returns | ||
| 152 | * -ENOIOCTLCMD (see also lirc_serial.c). | ||
| 153 | * | ||
| 154 | * @dev: pointer to the struct device associated with the LIRC | ||
| 155 | * device. | ||
| 156 | * | ||
| 157 | * @owner: the module owning this struct | 136 | * @owner: the module owning this struct |
| 158 | * | 137 | * @irctl: &struct irctl assigned to the device |
| 159 | * @irctl: the struct irctl for this LIRC device. | ||
| 160 | */ | 138 | */ |
| 161 | struct lirc_driver { | 139 | struct lirc_dev { |
| 162 | char name[40]; | 140 | char name[40]; |
| 163 | unsigned int minor; | 141 | unsigned int minor; |
| 164 | __u32 code_length; | 142 | __u32 code_length; |
| @@ -183,14 +161,14 @@ struct lirc_driver { · 18 unmodified lines | |||
| 183 | * returns negative value on error or zero | 161 | * returns negative value on error or zero |
| 184 | * contents of the structure pointed by p is copied | 162 | * contents of the structure pointed by p is copied |
| 185 | */ | 163 | */ |
| 186 | int lirc_register_driver(struct lirc_driver *d); | 164 | int lirc_register_device(struct lirc_dev *d); |
| 187 | 165 | ||
| 188 | void lirc_unregister_driver(struct lirc_driver *d); | 166 | void lirc_unregister_device(struct lirc_dev *d); |
| 189 | 167 | ||
| 190 | /* Must be called in the open fop before lirc_get_pdata() can be used */ | 168 | /* Must be called in the open fop before lirc_get_pdata() can be used */ |
| 191 | void lirc_init_pdata(struct inode *inode, struct file *file); | 169 | void lirc_init_pdata(struct inode *inode, struct file *file); |
| 192 | 170 | ||
| 193 | /* Returns the private data stored in the lirc_driver | 171 | /* Returns the private data stored in the lirc_dev |
| 194 | * associated with the given device file pointer. | 172 | * associated with the given device file pointer. |
| 195 | */ | 173 | */ |
| 196 | void *lirc_get_pdata(struct file *file); | 174 | void *lirc_get_pdata(struct file *file); |