Date: Mon, 3 Oct 2016 17:20:34 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306647 - in head/sys/dev: evdev usb/input Message-ID: <201610031720.u93HKY7S016801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Mon Oct 3 17:20:34 2016 New Revision: 306647 URL: https://svnweb.freebsd.org/changeset/base/306647 Log: const-ify struct evdev_methods Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Suggested by: hselasky Modified: head/sys/dev/evdev/evdev.c head/sys/dev/evdev/evdev.h head/sys/dev/evdev/evdev_private.h head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev.c Mon Oct 3 17:20:34 2016 (r306647) @@ -302,7 +302,7 @@ evdev_set_serial(struct evdev_dev *evdev inline void evdev_set_methods(struct evdev_dev *evdev, void *softc, - struct evdev_methods *methods) + const struct evdev_methods *methods) { evdev->ev_methods = methods; Modified: head/sys/dev/evdev/evdev.h ============================================================================== --- head/sys/dev/evdev/evdev.h Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev.h Mon Oct 3 17:20:34 2016 (r306647) @@ -89,7 +89,8 @@ void evdev_set_name(struct evdev_dev *, 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_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_unregister(struct evdev_dev *); int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t); Modified: head/sys/dev/evdev/evdev_private.h ============================================================================== --- head/sys/dev/evdev/evdev_private.h Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev_private.h Mon Oct 3 17:20:34 2016 (r306647) @@ -116,7 +116,7 @@ struct evdev_dev uint64_t ev_report_count; /* Parent driver callbacks: */ - struct evdev_methods * ev_methods; + const struct evdev_methods * ev_methods; void * ev_softc; LIST_ENTRY(evdev_dev) ev_link; Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/usb/input/ukbd.c Mon Oct 3 17:20:34 2016 (r306647) @@ -364,7 +364,7 @@ static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; #ifdef EVDEV_SUPPORT -static struct evdev_methods ukbd_evdev_methods = { +static const struct evdev_methods ukbd_evdev_methods = { .ev_event = evdev_ev_kbd_event, }; #endif Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/usb/input/ums.c Mon Oct 3 17:20:34 2016 (r306647) @@ -191,7 +191,7 @@ static struct usb_fifo_methods ums_fifo_ }; #ifdef EVDEV_SUPPORT -static struct evdev_methods ums_evdev_methods = { +static const struct evdev_methods ums_evdev_methods = { .ev_open = &ums_ev_open, .ev_close = &ums_ev_close, };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610031720.u93HKY7S016801>