History

[media] media: lirc_dev: make better use of file->private_data

By making better use of file->private_data in lirc_dev we can avoid digging around in the irctls[] array, thereby simplifying the code. External drivers need to use lirc_get_pdata() instead of mucking around in file->private_data. The newly introduced lirc_init_pdata() function isn't very elegant, but it's a stopgap measure which can be removed once lirc_zilog is converted to rc-core.

David Härdeman committed 9 years ago

Commit 615cd3f1 parent 0510d813 files · +33 −93Browse files

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

Unified · Split

include/media/lirc_dev.h+3−0
@@ -187,6 +187,9 @@ int lirc_register_driver(struct lirc_driver *d); · 186 unmodified lines
187 187
188void lirc_unregister_driver(struct lirc_driver *d);188void lirc_unregister_driver(struct lirc_driver *d);
189 189
190/* Must be called in the open fop before lirc_get_pdata() can be used */
191void lirc_init_pdata(struct inode *inode, struct file *file);
192
190/* Returns the private data stored in the lirc_driver193/* Returns the private data stored in the lirc_driver
191 * associated with the given device file pointer.194 * associated with the given device file pointer.
192 */195 */