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 | 156 | struct irctl *irctl; |
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | −/* following functions can be called ONLY from user context | |
| 160 | − * | |
| 161 | − * returns negative value on error or zero | |
| 162 | − * contents of the structure pointed by p is copied | |
| 163 | − */ | |
| 159 | +struct lirc_dev *lirc_allocate_device(void); | |
| 160 | + | |
| 161 | +void lirc_free_device(struct lirc_dev *d); | |
| 162 | + | |
| 164 | 163 | int lirc_register_device(struct lirc_dev *d); |
| 165 | 164 | |
| 166 | 165 | void lirc_unregister_device(struct lirc_dev *d); |