summaryrefslogtreecommitdiff
path: root/sys/dev/usb/ehci.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-04 12:28:22 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-04 12:28:22 +0000
commited682357fc00355553e54650c7675ad51e466f06 (patch)
tree8367db0158521a59266e68391261854e8c0edcbf /sys/dev/usb/ehci.c
parentc9e70c586a4e6a2929a102bb962c49b7512d0e6e (diff)
Use C99 initializers for pipe and bus methods.
Apart from improving readability, this will help us reduce the number of no-op functions now that some of them are optional. ok ratchov@
Diffstat (limited to 'sys/dev/usb/ehci.c')
-rw-r--r--sys/dev/usb/ehci.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index d4b063c126d..18f4f3ee91e 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.156 2014/05/30 13:24:59 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.157 2014/06/04 12:28:21 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -216,65 +216,65 @@ void ehci_dump_exfer(struct ehci_xfer *);
#define ehci_active_intr_list(ex) ((ex)->inext.tqe_prev != NULL)
struct usbd_bus_methods ehci_bus_methods = {
- ehci_open,
- ehci_softintr,
- ehci_poll,
- ehci_allocx,
- ehci_freex,
+ .open_pipe = ehci_open,
+ .soft_intr = ehci_softintr,
+ .do_poll = ehci_poll,
+ .allocx = ehci_allocx,
+ .freex = ehci_freex,
};
struct usbd_pipe_methods ehci_root_ctrl_methods = {
- ehci_root_ctrl_transfer,
- ehci_root_ctrl_start,
- ehci_root_ctrl_abort,
- ehci_root_ctrl_close,
- ehci_noop,
- ehci_root_ctrl_done,
+ .transfer = ehci_root_ctrl_transfer,
+ .start = ehci_root_ctrl_start,
+ .abort = ehci_root_ctrl_abort,
+ .close = ehci_root_ctrl_close,
+ .cleartoggle = ehci_noop,
+ .done = ehci_root_ctrl_done,
};
struct usbd_pipe_methods ehci_root_intr_methods = {
- ehci_root_intr_transfer,
- ehci_root_intr_start,
- ehci_root_intr_abort,
- ehci_root_intr_close,
- ehci_noop,
- ehci_root_intr_done,
+ .transfer = ehci_root_intr_transfer,
+ .start = ehci_root_intr_start,
+ .abort = ehci_root_intr_abort,
+ .close = ehci_root_intr_close,
+ .cleartoggle = ehci_noop,
+ .done = ehci_root_intr_done,
};
struct usbd_pipe_methods ehci_device_ctrl_methods = {
- ehci_device_ctrl_transfer,
- ehci_device_ctrl_start,
- ehci_device_ctrl_abort,
- ehci_device_ctrl_close,
- ehci_noop,
- ehci_device_ctrl_done,
+ .transfer = ehci_device_ctrl_transfer,
+ .start = ehci_device_ctrl_start,
+ .abort = ehci_device_ctrl_abort,
+ .close = ehci_device_ctrl_close,
+ .cleartoggle = ehci_noop,
+ .done = ehci_device_ctrl_done,
};
struct usbd_pipe_methods ehci_device_intr_methods = {
- ehci_device_intr_transfer,
- ehci_device_intr_start,
- ehci_device_intr_abort,
- ehci_device_intr_close,
- ehci_device_clear_toggle,
- ehci_device_intr_done,
+ .transfer = ehci_device_intr_transfer,
+ .start = ehci_device_intr_start,
+ .abort = ehci_device_intr_abort,
+ .close = ehci_device_intr_close,
+ .cleartoggle = ehci_device_clear_toggle,
+ .done = ehci_device_intr_done,
};
struct usbd_pipe_methods ehci_device_bulk_methods = {
- ehci_device_bulk_transfer,
- ehci_device_bulk_start,
- ehci_device_bulk_abort,
- ehci_device_bulk_close,
- ehci_device_clear_toggle,
- ehci_device_bulk_done,
+ .transfer = ehci_device_bulk_transfer,
+ .start = ehci_device_bulk_start,
+ .abort = ehci_device_bulk_abort,
+ .close = ehci_device_bulk_close,
+ .cleartoggle = ehci_device_clear_toggle,
+ .done = ehci_device_bulk_done,
};
struct usbd_pipe_methods ehci_device_isoc_methods = {
- ehci_device_isoc_transfer,
- ehci_device_isoc_start,
- ehci_device_isoc_abort,
- ehci_device_isoc_close,
- ehci_noop,
- ehci_device_isoc_done,
+ .transfer = ehci_device_isoc_transfer,
+ .start = ehci_device_isoc_start,
+ .abort = ehci_device_isoc_abort,
+ .close = ehci_device_isoc_close,
+ .cleartoggle = ehci_noop,
+ .done = ehci_device_isoc_done,
};
/*