Module Name: src Committed By: skrll Date: Sat Mar 21 10:14:46 UTC 2015
Modified Files: src/sys/dev/usb [nick-nhusb]: slurm.c uatp.c ubt.c ukyopon.c uyurex.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.1.18.2 -r1.1.18.3 src/sys/dev/usb/slurm.c cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/sys/dev/usb/uatp.c cvs rdiff -u -r1.51.4.3 -r1.51.4.4 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.16.16.2 -r1.16.16.3 src/sys/dev/usb/ukyopon.c cvs rdiff -u -r1.9.14.3 -r1.9.14.4 src/sys/dev/usb/uyurex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/slurm.c diff -u src/sys/dev/usb/slurm.c:1.1.18.2 src/sys/dev/usb/slurm.c:1.1.18.3 --- src/sys/dev/usb/slurm.c:1.1.18.2 Thu Mar 19 17:26:43 2015 +++ src/sys/dev/usb/slurm.c Sat Mar 21 10:14:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: slurm.c,v 1.1.18.2 2015/03/19 17:26:43 skrll Exp $ */ +/* $NetBSD: slurm.c,v 1.1.18.3 2015/03/21 10:14:45 skrll Exp $ */ /* * Copyright (c) 2012 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: slurm.c,v 1.1.18.2 2015/03/19 17:26:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: slurm.c,v 1.1.18.3 2015/03/21 10:14:45 skrll Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -102,7 +102,7 @@ static const struct radio_hw_if slurm_ra CFATTACH_DECL_NEW(slurm, sizeof(struct slurm_softc), slurm_match, slurm_attach, slurm_detach, NULL); -static int +static int slurm_match(device_t parent, cfdata_t match, void *aux) { const struct usbif_attach_arg * const uaa = aux; @@ -117,7 +117,7 @@ slurm_match(device_t parent, cfdata_t ma return UMATCH_NONE; } -static void +static void slurm_attach(device_t parent, device_t self, void *aux) { struct slurm_softc * const sc = device_private(self); @@ -145,7 +145,7 @@ slurm_attach(device_t parent, device_t s radio_attach_mi(&slurm_radio, sc, self); } -static int +static int slurm_detach(device_t self, int flags) { struct slurm_softc * const sc = device_private(self); @@ -202,7 +202,7 @@ static int slurm_search(void *v, int f) { struct slurm_softc * const sc = v; - + return slurm_si470x_search(sc, f); } Index: src/sys/dev/usb/uatp.c diff -u src/sys/dev/usb/uatp.c:1.10.4.1 src/sys/dev/usb/uatp.c:1.10.4.2 --- src/sys/dev/usb/uatp.c:1.10.4.1 Thu Mar 19 17:26:43 2015 +++ src/sys/dev/usb/uatp.c Sat Mar 21 10:14:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uatp.c,v 1.10.4.1 2015/03/19 17:26:43 skrll Exp $ */ +/* $NetBSD: uatp.c,v 1.10.4.2 2015/03/21 10:14:45 skrll Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ * Apple's protocol gives more detailed sensor data that lets us detect * multiple fingers to emulate multi-button mice and scroll wheels. */ - + /* * Protocol * @@ -104,7 +104,7 @@ * Should make a struct uatp_motion for all that state. * XXX Add hooks for ignoring trackpad input while typing. */ - + /* * Classifying devices * @@ -144,9 +144,9 @@ * tweak hw.uatp0.x_sensors and hw.uatp0.y_sensors, up to a maximum * of 32 for each value. */ - + #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.10.4.1 2015/03/19 17:26:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.10.4.2 2015/03/21 10:14:45 skrll Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -179,7 +179,7 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.1 fail; \ } \ } while (0) - + #define UATP_DEBUG_ATTACH (1 << 0) #define UATP_DEBUG_MISC (1 << 1) #define UATP_DEBUG_WSMOUSE (1 << 2) @@ -238,7 +238,7 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.1 #define UATP_STATUS_BUTTON (1 << 0) /* Button pressed */ #define UATP_STATUS_BASE (1 << 2) /* Base sensor data */ #define UATP_STATUS_POST_RESET (1 << 4) /* Post-reset */ - + /* Forward declarations */ struct uatp_softc; /* Device driver state. */ @@ -340,7 +340,7 @@ static bool motion_below_threshold(struc int, int); static int accelerate(struct uatp_softc *, unsigned int, unsigned int, unsigned int, unsigned int, bool, int *); - + struct uatp_knobs { /* * Button emulation. What do we do when two or three fingers @@ -408,7 +408,7 @@ struct uatp_knobs { unsigned int three_finger_tap_buttons; unsigned int tap_track_distance_limit; }; - + static const struct uatp_knobs default_knobs = { /* * Button emulation. Fingers on the trackpad don't change it @@ -473,7 +473,7 @@ static const struct uatp_knobs default_k .three_finger_tap_buttons = 0, .tap_track_distance_limit = 200, }; - + struct uatp_softc { struct uhidev sc_hdev; /* USB parent. */ device_t sc_wsmousedev; /* Attached wsmouse device. */ @@ -522,7 +522,7 @@ struct uatp_softc { uint32_t sc_debug_flags; /* Debugging output enabled. */ #endif }; - + struct uatp_descriptor { uint16_t vendor; uint16_t product; @@ -559,7 +559,7 @@ struct uatp_parameters { /* Called on spurious interrupts to reset. May be null. */ void (*reset)(struct uatp_softc *); }; - + /* Known device parameters */ static const struct uatp_parameters fountain_parameters = { @@ -617,7 +617,7 @@ static const struct uatp_parameters geys .accumulate = accumulate_sample_2, .reset = geyser34_deferred_reset, }; - + /* Known device models */ #define APPLE_TRACKPAD(PRODUCT, DESCRIPTION, PARAMETERS) \ @@ -661,7 +661,7 @@ static const struct uatp_descriptor uatp #undef MACBOOK_TRACKPAD #undef POWERBOOK_TRACKPAD #undef APPLE_TRACKPAD - + /* Miscellaneous utilities */ static const struct uatp_descriptor * @@ -722,7 +722,7 @@ uatp_clear_position(struct uatp_softc *s sc->sc_w_remainder = 0; sc->sc_track_distance = 0; } - + static unsigned int uatp_x_sensors(const struct uatp_softc *sc) { @@ -764,7 +764,7 @@ uatp_y_ratio(const struct uatp_softc *sc else return sc->sc_parameters->y_ratio; } - + static unsigned int uatp_old_raw_weight(const struct uatp_softc *sc) { @@ -795,7 +795,7 @@ uatp_new_raw_weight(const struct uatp_so else return 1; } - + static int scale_motion(const struct uatp_softc *sc, int delta, int *remainder, const unsigned int *multiplier, const unsigned int *divisor) @@ -848,7 +848,7 @@ uatp_scale_fast_motion(const struct uatp &sc->sc_knobs.fast_motion_multiplier, &sc->sc_knobs.fast_motion_divisor); } - + /* Driver goop */ CFATTACH_DECL2_NEW(uatp, sizeof(struct uatp_softc), uatp_match, uatp_attach, @@ -909,7 +909,7 @@ uatp_match(device_t parent, cfdata_t mat return UMATCH_VENDOR_PRODUCT_CONF_IFACE; } - + static void uatp_attach(device_t parent, device_t self, void *aux) { @@ -977,7 +977,7 @@ uatp_attach(device_t parent, device_t se sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &a, wsmousedevprint); } - + /* Sysctl setup */ static void @@ -1032,7 +1032,7 @@ uatp_setup_sysctl(struct uatp_softc *sc) "width of right edge for edge scrolling")) goto err; #endif - + /* * Multifinger tracking. */ @@ -1101,7 +1101,7 @@ uatp_setup_sysctl(struct uatp_softc *sc) if (!uatp_setup_sysctl_knob(sc, &sc->sc_knobs.motion_delay, "motion_delay", "number of packets before motion kicks in")) goto err; - + /* * Tapping. */ @@ -1152,7 +1152,7 @@ uatp_setup_sysctl_knob(struct uatp_softc return true; } - + /* More driver goop */ static void @@ -1210,7 +1210,7 @@ uatp_activate(device_t self, enum devact return 0; } - + /* wsmouse routines */ static int @@ -1271,7 +1271,7 @@ uatp_ioctl(void *v, unsigned long cmd, v /* XXX Implement any relevant wsmouse(4) ioctls. */ return EPASSTHROUGH; } - + /* * The Geyser 3 and 4 models talk the generic USB HID mouse protocol by * default. This mode switch makes them give raw sensor data instead @@ -1304,7 +1304,7 @@ geyser34_enable_raw_mode(struct uatp_sof "error reading feature report: %s\n", usbd_errstr(status)); return; } - + #if UATP_DEBUG if (sc->sc_debug_flags & UATP_DEBUG_RESET) { unsigned int i; @@ -1338,7 +1338,7 @@ geyser34_enable_raw_mode(struct uatp_sof return; } } - + /* * The Geyser 3 and 4 need to be reset periodically after we detect a * continual flow of spurious interrupts. We use a USB task for this. @@ -1383,7 +1383,7 @@ geyser34_reset_task(void *arg) /* Reset by putting it into raw mode. Not sure why. */ geyser34_enable_raw_mode(sc); } - + /* Interrupt handler */ static void @@ -1448,7 +1448,7 @@ uatp_intr(struct uhidev *addr, void *ibu memset(uatp_y_sample(sc), 0, UATP_MAX_Y_SENSORS); sc->sc_parameters->read_sample(uatp_x_sample(sc), uatp_y_sample(sc), input); - + #if UATP_DEBUG if (sc->sc_debug_flags & UATP_DEBUG_INTR) { unsigned int i; @@ -1520,7 +1520,7 @@ uatp_intr(struct uhidev *addr, void *ibu uatp_input(sc, buttons, dx, dy, dz, dw); mutex_exit(&sc->sc_tap_mutex); } - + /* * Different ways to discern the base sample initializing the state. * `base_sample_softc_flag' uses a state flag stored in the softc; @@ -1578,7 +1578,7 @@ read_sample_2(uint8_t *x, uint8_t *y, co y[i + 1] = input[j + 1]; } } - + static void accumulate_sample_1(struct uatp_softc *sc) { @@ -1625,7 +1625,7 @@ accumulate_sample_2(struct uatp_softc *s sc->sc_acc[i] = 0; } } - + /* * Report input to wsmouse, if there is anything interesting to report. * We must take into consideration the current tap-and-drag button @@ -1689,7 +1689,7 @@ uatp_tapped_buttons(struct uatp_softc *s return 0; } } - + /* * Interpret the current input state to find a difference in all the * relevant coordinates and buttons to pass on to wsmouse, and update @@ -1756,7 +1756,7 @@ interpret_input(struct uatp_softc *sc, i return true; } } - + /* * Interpret the accumulated sensor state along one dimension to find * the number, mean position, and pressure of fingers. Returns 0 to @@ -1825,7 +1825,7 @@ interpret_dimension(struct uatp_softc *s n_fingers = 0; memset(weighted, 0, sizeof weighted); memset(total, 0, sizeof total); - + for (i = 0; i < n_sensors; i++) { CHECK_(0 <= acc[i]); v = acc[i]; @@ -1902,7 +1902,7 @@ interpret_dimension(struct uatp_softc *s #undef CHECK_ } - + /* Tapping */ /* @@ -1960,7 +1960,7 @@ interpret_dimension(struct uatp_softc *s * these properties, or globally transform the state machine to avoid * the bad consequences of violating these properties. */ - + static void uatp_tap_limit(const struct uatp_softc *sc, struct timeval *limit) { @@ -2008,7 +2008,7 @@ tap_debug(struct uatp_softc *sc, const c # define TAP_DEBUG_POST(sc) do {} while (0) #endif - + static void tap_initialize(struct uatp_softc *sc) { @@ -2079,7 +2079,7 @@ tap_reset_wait(struct uatp_softc *sc) tap_transition_initial(sc); mutex_exit(&sc->sc_tap_mutex); } - + static const struct timeval zero_timeval; static void @@ -2126,7 +2126,7 @@ tap_transition_double_tapping(struct uat tap_transition(sc, TAP_STATE_DOUBLE_TAPPING, start_time, fingers, sc->sc_tapped_fingers); } - + static void tap_transition_dragging_down(struct uatp_softc *sc) { @@ -2173,7 +2173,7 @@ tap_transition_dragging_up(struct uatp_s tap_transition(sc, TAP_STATE_DRAGGING_UP, &zero_timeval, 0, sc->sc_tapped_fingers); } - + static void tap_touched(struct uatp_softc *sc, unsigned int fingers) { @@ -2248,7 +2248,7 @@ tap_touched(struct uatp_softc *sc, unsig TAP_DEBUG_POST(sc); mutex_exit(&sc->sc_tap_mutex); } - + static bool tap_released(struct uatp_softc *sc) { @@ -2325,7 +2325,7 @@ tap_released(struct uatp_softc *sc) mutex_exit(&sc->sc_tap_mutex); return ok; } - + /* Untapping: Releasing the button after a tap */ static void @@ -2380,7 +2380,7 @@ untap_callout(void *arg) cv_broadcast(&sc->sc_tap_cv); mutex_exit(&sc->sc_tap_mutex); } - + /* * Emulate different buttons if the user holds down n fingers while * pressing the physical button. (This is unrelated to tapping.) @@ -2406,7 +2406,7 @@ emulated_buttons(struct uatp_softc *sc, return sc->sc_knobs.three_finger_buttons; } } - + /* * Update the position known to the driver based on the position and * number of fingers. dx, dy, dz, and dw are expected to hold zero; @@ -2449,7 +2449,7 @@ scroll_wheel(struct uatp_softc *sc, unsi &sc->sc_z_remainder, &sc->sc_w_remainder, dz, dw); } - + static void move(struct uatp_softc *sc, const char *ctx, unsigned int a, unsigned int b, int *a_raw, int *b_raw, @@ -2505,7 +2505,7 @@ move(struct uatp_softc *sc, const char * CHECK_(0 <= *b_smoothed); CHECK_(*a_smoothed <= UATP_MAX_POSITION); CHECK_(*b_smoothed <= UATP_MAX_POSITION); - + if (sc->sc_motion_timer < sc->sc_knobs.motion_delay) { DPRINTF(sc, UATP_DEBUG_MOVE, ("delay motion %u\n", sc->sc_motion_timer)); @@ -2574,7 +2574,7 @@ move(struct uatp_softc *sc, const char * #undef CHECK_ } - + static int smooth(struct uatp_softc *sc, unsigned int old_raw, unsigned int old_smoothed, unsigned int raw) @@ -2647,7 +2647,7 @@ accelerate(struct uatp_softc *sc, unsign #undef CHECK_ } - + MODULE(MODULE_CLASS_DRIVER, uatp, NULL); #ifdef _MODULE Index: src/sys/dev/usb/ubt.c diff -u src/sys/dev/usb/ubt.c:1.51.4.3 src/sys/dev/usb/ubt.c:1.51.4.4 --- src/sys/dev/usb/ubt.c:1.51.4.3 Thu Mar 19 17:26:43 2015 +++ src/sys/dev/usb/ubt.c Sat Mar 21 10:14:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.51.4.3 2015/03/19 17:26:43 skrll Exp $ */ +/* $NetBSD: ubt.c,v 1.51.4.4 2015/03/21 10:14:46 skrll Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.51.4.3 2015/03/19 17:26:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.51.4.4 2015/03/21 10:14:46 skrll Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -315,7 +315,7 @@ const struct ubt_devno { #define ubt_lookup(vendor, product) \ ((const struct ubt_devno *)usb_lookup(ubt_dev, vendor, product)) -int +int ubt_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -334,7 +334,7 @@ ubt_match(device_t parent, cfdata_t matc return UMATCH_NONE; } -void +void ubt_attach(device_t parent, device_t self, void *aux) { struct ubt_softc *sc = device_private(self); @@ -532,7 +532,7 @@ ubt_attach(device_t parent, device_t sel return; } -int +int ubt_detach(device_t self, int flags) { struct ubt_softc *sc = device_private(self); @@ -607,7 +607,7 @@ ubt_set_isoc_config(struct ubt_softc *sc err = usbd_set_interface(sc->sc_iface1, sc->sc_config); if (err != USBD_NORMAL_COMPLETION) { - aprint_error_dev(sc->sc_dev, + aprint_error_dev(sc->sc_dev, "Could not set config %d on ISOC interface. %s (%d)\n", sc->sc_config, usbd_errstr(err), err); @@ -1694,7 +1694,7 @@ ubt_recv_sco_complete(struct usbd_xfer * sc->sc_stats.sco_rx++; if (!hci_input_sco(sc->sc_unit, m)) sc->sc_stats.err_rx++; - + m = NULL; } } Index: src/sys/dev/usb/ukyopon.c diff -u src/sys/dev/usb/ukyopon.c:1.16.16.2 src/sys/dev/usb/ukyopon.c:1.16.16.3 --- src/sys/dev/usb/ukyopon.c:1.16.16.2 Sat Dec 6 08:37:30 2014 +++ src/sys/dev/usb/ukyopon.c Sat Mar 21 10:14:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ukyopon.c,v 1.16.16.2 2014/12/06 08:37:30 skrll Exp $ */ +/* $NetBSD: ukyopon.c,v 1.16.16.3 2015/03/21 10:14:46 skrll Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.16.16.2 2014/12/06 08:37:30 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.16.16.3 2015/03/21 10:14:46 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -103,7 +103,7 @@ int ukyopon_activate(device_ extern struct cfdriver ukyopon_cd; CFATTACH_DECL_NEW(ukyopon, sizeof(struct ukyopon_softc), ukyopon_match, ukyopon_attach, ukyopon_detach, ukyopon_activate); -int +int ukyopon_match(device_t parent, cfdata_t match, void *aux) { struct usbif_attach_arg *uaa = aux; @@ -117,7 +117,7 @@ ukyopon_match(device_t parent, cfdata_t return (UMATCH_NONE); } -void +void ukyopon_attach(device_t parent, device_t self, void *aux) { struct ukyopon_softc *sc = device_private(self); @@ -184,7 +184,7 @@ ukyopon_activate(device_t self, enum dev return umodem_common_activate(&sc->sc_umodem, act); } -int +int ukyopon_detach(device_t self, int flags) { struct ukyopon_softc *sc = device_private(self); Index: src/sys/dev/usb/uyurex.c diff -u src/sys/dev/usb/uyurex.c:1.9.14.3 src/sys/dev/usb/uyurex.c:1.9.14.4 --- src/sys/dev/usb/uyurex.c:1.9.14.3 Sat Mar 21 10:07:15 2015 +++ src/sys/dev/usb/uyurex.c Sat Mar 21 10:14:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uyurex.c,v 1.9.14.3 2015/03/21 10:07:15 skrll Exp $ */ +/* $NetBSD: uyurex.c,v 1.9.14.4 2015/03/21 10:14:46 skrll Exp $ */ /* $OpenBSD: uyurex.c,v 1.3 2010/03/04 03:47:22 deraadt Exp $ */ /* @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.9.14.3 2015/03/21 10:07:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.9.14.4 2015/03/21 10:14:46 skrll Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -113,7 +113,7 @@ extern struct cfdriver uyurex_cd; CFATTACH_DECL_NEW(uyurex, sizeof(struct uyurex_softc), uyurex_match, uyurex_attach, uyurex_detach, uyurex_activate); -int +int uyurex_match(device_t parent, cfdata_t match, void *aux) { struct uhidev_attach_arg *uha = aux; @@ -124,7 +124,7 @@ uyurex_match(device_t parent, cfdata_t m return (UMATCH_VENDOR_PRODUCT); } -void +void uyurex_attach(device_t parent, device_t self, void *aux) { struct uyurex_softc *sc = device_private(self); @@ -196,7 +196,7 @@ uyurex_attach(device_t parent, device_t uyurex_set_mode(sc, 0); } -int +int uyurex_detach(device_t self, int flags) { struct uyurex_softc *sc = device_private(self);