const-ify struct evdev_methods
Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Suggested by: hselasky
This commit is contained in:
parent
18f555023a
commit
5163e77fad
@ -302,7 +302,7 @@ evdev_set_serial(struct evdev_dev *evdev, const char *serial)
|
|||||||
|
|
||||||
inline void
|
inline void
|
||||||
evdev_set_methods(struct evdev_dev *evdev, void *softc,
|
evdev_set_methods(struct evdev_dev *evdev, void *softc,
|
||||||
struct evdev_methods *methods)
|
const struct evdev_methods *methods)
|
||||||
{
|
{
|
||||||
|
|
||||||
evdev->ev_methods = methods;
|
evdev->ev_methods = methods;
|
||||||
|
@ -89,7 +89,8 @@ void evdev_set_name(struct evdev_dev *, const char *);
|
|||||||
void evdev_set_id(struct evdev_dev *, uint16_t, uint16_t, uint16_t, uint16_t);
|
void evdev_set_id(struct evdev_dev *, uint16_t, uint16_t, uint16_t, uint16_t);
|
||||||
void evdev_set_phys(struct evdev_dev *, const char *);
|
void evdev_set_phys(struct evdev_dev *, const char *);
|
||||||
void evdev_set_serial(struct evdev_dev *, const char *);
|
void evdev_set_serial(struct evdev_dev *, const char *);
|
||||||
void evdev_set_methods(struct evdev_dev *, void *, struct evdev_methods *);
|
void evdev_set_methods(struct evdev_dev *, void *,
|
||||||
|
const struct evdev_methods *);
|
||||||
int evdev_register(struct evdev_dev *);
|
int evdev_register(struct evdev_dev *);
|
||||||
int evdev_unregister(struct evdev_dev *);
|
int evdev_unregister(struct evdev_dev *);
|
||||||
int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t);
|
int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t);
|
||||||
|
@ -116,7 +116,7 @@ struct evdev_dev
|
|||||||
uint64_t ev_report_count;
|
uint64_t ev_report_count;
|
||||||
|
|
||||||
/* Parent driver callbacks: */
|
/* Parent driver callbacks: */
|
||||||
struct evdev_methods * ev_methods;
|
const struct evdev_methods * ev_methods;
|
||||||
void * ev_softc;
|
void * ev_softc;
|
||||||
|
|
||||||
LIST_ENTRY(evdev_dev) ev_link;
|
LIST_ENTRY(evdev_dev) ev_link;
|
||||||
|
@ -364,7 +364,7 @@ static device_detach_t ukbd_detach;
|
|||||||
static device_resume_t ukbd_resume;
|
static device_resume_t ukbd_resume;
|
||||||
|
|
||||||
#ifdef EVDEV_SUPPORT
|
#ifdef EVDEV_SUPPORT
|
||||||
static struct evdev_methods ukbd_evdev_methods = {
|
static const struct evdev_methods ukbd_evdev_methods = {
|
||||||
.ev_event = evdev_ev_kbd_event,
|
.ev_event = evdev_ev_kbd_event,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -191,7 +191,7 @@ static struct usb_fifo_methods ums_fifo_methods = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef EVDEV_SUPPORT
|
#ifdef EVDEV_SUPPORT
|
||||||
static struct evdev_methods ums_evdev_methods = {
|
static const struct evdev_methods ums_evdev_methods = {
|
||||||
.ev_open = &ums_ev_open,
|
.ev_open = &ums_ev_open,
|
||||||
.ev_close = &ums_ev_close,
|
.ev_close = &ums_ev_close,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user