kbd: const'ify a couple of keyboard_driver fields
Nothing modifies these things, but const'ify out of an abundance of caution. If we could const'ify the definition in each keyboard driver, I likely would- improper mutations here can lead to misbehavior or slightly more annoying to debug state.
This commit is contained in:
parent
fa9b4635f0
commit
7987629081
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355842
@ -96,12 +96,17 @@ typedef struct keyboard_switch {
|
|||||||
kbd_diag_t *diag;
|
kbd_diag_t *diag;
|
||||||
} keyboard_switch_t;
|
} keyboard_switch_t;
|
||||||
|
|
||||||
/* keyboard driver */
|
/*
|
||||||
|
* Keyboard driver definition. Some of these be immutable after definition
|
||||||
|
* time, e.g. one shouldn't be able to rename a driver or use a different kbdsw
|
||||||
|
* entirely, but patching individual methods is acceptable.
|
||||||
|
*/
|
||||||
typedef struct keyboard_driver {
|
typedef struct keyboard_driver {
|
||||||
SLIST_ENTRY(keyboard_driver) link;
|
SLIST_ENTRY(keyboard_driver) link;
|
||||||
char *name;
|
const char * const name;
|
||||||
keyboard_switch_t *kbdsw;
|
keyboard_switch_t * const kbdsw;
|
||||||
int (*configure)(int); /* backdoor for the console driver */
|
/* backdoor for the console driver */
|
||||||
|
int (* const configure)(int);
|
||||||
} keyboard_driver_t;
|
} keyboard_driver_t;
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
|
Loading…
Reference in New Issue
Block a user