diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-19 11:52:08 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-19 11:52:08 +0000 |
commit | 2a7fbe4f91efb6662b233e92e54c0db7db09acb7 (patch) | |
tree | 5653b8932528bae3f44bd7f42b49a1cff6155c18 /sys | |
parent | d0e1af2319c39a7f86c86c53ecc70fc0fa9ec1b5 (diff) |
KNF after the recent macro expansion, mostly prototype indendation.
No binary change.
ok uwe.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/usbf.c | 25 | ||||
-rw-r--r-- | sys/dev/usb/usbf.h | 37 |
2 files changed, 27 insertions, 35 deletions
diff --git a/sys/dev/usb/usbf.c b/sys/dev/usb/usbf.c index 5d8ee5558fc..f73f55c426f 100644 --- a/sys/dev/usb/usbf.c +++ b/sys/dev/usb/usbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbf.c,v 1.8 2007/06/13 06:25:03 mbalmer Exp $ */ +/* $OpenBSD: usbf.c,v 1.9 2007/06/19 11:52:07 mbalmer Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -82,17 +82,18 @@ struct usbf_softc { #define DEVNAME(sc) ((sc)->sc_dev.dv_xname) -int usbf_match(struct device *, void *, void *); -void usbf_attach(struct device *, struct device *, void *); -void usbf_create_thread(void *); -void usbf_task_thread(void *); +int usbf_match(struct device *, void *, void *); +void usbf_attach(struct device *, struct device *, void *); +void usbf_create_thread(void *); +void usbf_task_thread(void *); -usbf_status usbf_get_descriptor(usbf_device_handle, usb_device_request_t *, void **); -void usbf_set_address(usbf_device_handle, u_int8_t); -usbf_status usbf_set_config(usbf_device_handle, u_int8_t); +usbf_status usbf_get_descriptor(usbf_device_handle, usb_device_request_t *, + void **); +void usbf_set_address(usbf_device_handle, u_int8_t); +usbf_status usbf_set_config(usbf_device_handle, u_int8_t); #ifdef USBF_DEBUG -void usbf_dump_request(usbf_device_handle, usb_device_request_t *); +void usbf_dump_request(usbf_device_handle, usb_device_request_t *); #endif struct cfattach usbf_ca = { @@ -255,8 +256,7 @@ usbf_task_thread(void *arg) splx(s); task->fun(task->arg); s = splusb(); - DPRINTF(1,("usbf_task_thread: done task=%p\n", - task)); + DPRINTF(1,("usbf_task_thread: done task=%p\n", task)); } } splx(s); @@ -398,8 +398,7 @@ usbf_set_config(usbf_device_handle dev, u_int8_t new) if (dev->function->methods->set_config) err = fun->methods->set_config(fun, NULL); if (err) { - DPRINTF(0,("usbf_set_config: %s\n", - usbf_errstr(err))); + DPRINTF(0,("usbf_set_config: %s\n", usbf_errstr(err))); } dev->config = NULL; return USBF_NORMAL_COMPLETION; diff --git a/sys/dev/usb/usbf.h b/sys/dev/usb/usbf.h index b7307515b18..56c6cea79d0 100644 --- a/sys/dev/usb/usbf.h +++ b/sys/dev/usb/usbf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbf.h,v 1.2 2007/06/06 19:25:50 mk Exp $ */ +/* $OpenBSD: usbf.h,v 1.3 2007/06/19 11:52:07 mbalmer Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -100,29 +100,23 @@ const char *usbf_errstr(usbf_status); /* device */ void usbf_devinfo_setup(usbf_device_handle, u_int8_t, u_int8_t, - u_int8_t, u_int16_t, u_int16_t, - u_int16_t, const char *, const char *, - const char *); + u_int8_t, u_int16_t, u_int16_t, u_int16_t, const char *, + const char *, const char *); char *usbf_devinfo_alloc(usbf_device_handle); void usbf_devinfo_free(char *); -usb_device_descriptor_t * - usbf_device_descriptor(usbf_device_handle); -usb_string_descriptor_t * - usbf_string_descriptor(usbf_device_handle, u_int8_t); -usb_config_descriptor_t * - usbf_config_descriptor(usbf_device_handle, u_int8_t); +usb_device_descriptor_t *usbf_device_descriptor(usbf_device_handle); +usb_string_descriptor_t *usbf_string_descriptor(usbf_device_handle, u_int8_t); +usb_config_descriptor_t *usbf_config_descriptor(usbf_device_handle, u_int8_t); /* configuration */ u_int8_t usbf_add_string(usbf_device_handle, const char *); usbf_status usbf_add_config(usbf_device_handle, usbf_config_handle *); usbf_status usbf_add_config_desc(usbf_config_handle, usb_descriptor_t *, - usb_descriptor_t **); + usb_descriptor_t **); usbf_status usbf_add_interface(usbf_config_handle, u_int8_t, u_int8_t, - u_int8_t, const char *, - usbf_interface_handle *); + u_int8_t, const char *, usbf_interface_handle *); usbf_status usbf_add_endpoint(usbf_interface_handle, u_int8_t, - u_int8_t, u_int16_t, u_int8_t, - usbf_endpoint_handle *); + u_int8_t, u_int16_t, u_int8_t, usbf_endpoint_handle *); usbf_status usbf_end_config(usbf_config_handle); usbf_endpoint_handle usbf_config_endpoint(usbf_config_handle, u_int8_t); @@ -139,7 +133,7 @@ u_int8_t usbf_endpoint_attributes(usbf_endpoint_handle); /* pipe */ usbf_status usbf_open_pipe(usbf_interface_handle, u_int8_t, - usbf_pipe_handle *); + usbf_pipe_handle *); void usbf_abort_pipe(usbf_pipe_handle); void usbf_close_pipe(usbf_pipe_handle); void usbf_stall_pipe(usbf_pipe_handle); @@ -150,14 +144,13 @@ void usbf_free_xfer(usbf_xfer_handle); void *usbf_alloc_buffer(usbf_xfer_handle, u_int32_t); void usbf_free_buffer(usbf_xfer_handle); void usbf_setup_xfer(usbf_xfer_handle, usbf_pipe_handle, - usbf_private_handle, void *, u_int32_t, - u_int16_t, u_int32_t, usbf_callback); + usbf_private_handle, void *, u_int32_t, u_int16_t, + u_int32_t, usbf_callback); void usbf_setup_default_xfer(usbf_xfer_handle, usbf_pipe_handle, - usbf_private_handle, - usb_device_request_t *, u_int16_t, - u_int32_t, usbf_callback); + usbf_private_handle, usb_device_request_t *, u_int16_t, + u_int32_t, usbf_callback); void usbf_get_xfer_status(usbf_xfer_handle, usbf_private_handle *, - void **, u_int32_t *, usbf_status *); + void **, u_int32_t *, usbf_status *); usbf_status usbf_transfer(usbf_xfer_handle); /* |