Introduce two new functions so that the API for lirc_dev matches that of the rc-core and input subsystems. This means that lirc_dev structs are managed using the usual four functions: lirc_allocate_device lirc_free_device lirc_register_device lirc_unregister_device The functions are pretty simplistic at this point, later patches will put more flesh on the bones of both.
Showing the changes to include/media/lirc_dev.h (1 of 3 files). Show all
Unified · Split
| @@ -156,11 +156,10 @@ struct lirc_dev { · 155 unmodified lines | |||
| 156 | struct irctl *irctl; | 156 | struct irctl *irctl; |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | /* following functions can be called ONLY from user context | 159 | struct lirc_dev *lirc_allocate_device(void); |
| 160 | * | 160 | |
| 161 | * returns negative value on error or zero | 161 | void lirc_free_device(struct lirc_dev *d); |
| 162 | * contents of the structure pointed by p is copied | 162 | |
| 163 | */ | ||
| 164 | int lirc_register_device(struct lirc_dev *d); | 163 | int lirc_register_device(struct lirc_dev *d); |
| 165 | 164 | ||
| 166 | void lirc_unregister_device(struct lirc_dev *d); | 165 | void lirc_unregister_device(struct lirc_dev *d); |