From 59d8a61ca70640ab0263ea75d7671e8b3ae3c8ad Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Sat, 15 Jun 2019 21:19:23 +0000 Subject: [PATCH] Spell unsigned int as u_int and channel as chan; eliminates the need to wrap some long lines. --- sys/dev/pwm/pwmbus.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/pwm/pwmbus.c b/sys/dev/pwm/pwmbus.c index 259f1c1076e8..7170869d61b8 100644 --- a/sys/dev/pwm/pwmbus.c +++ b/sys/dev/pwm/pwmbus.c @@ -101,81 +101,81 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t bus, int channel, unsigned int period, unsigned int duty) +pwmbus_channel_config(device_t bus, int chan, u_int period, u_int duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_get_config(device_t bus, int channel, unsigned int *period, unsigned int *duty) +pwmbus_channel_get_config(device_t bus, int chan, u_int *period, u_int *duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_GET_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_set_flags(device_t bus, int channel, uint32_t flags) +pwmbus_channel_set_flags(device_t bus, int chan, uint32_t flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_SET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_SET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_get_flags(device_t bus, int channel, uint32_t *flags) +pwmbus_channel_get_flags(device_t bus, int chan, uint32_t *flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_GET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_enable(device_t bus, int channel, bool enable) +pwmbus_channel_enable(device_t bus, int chan, bool enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_ENABLE(sc->dev, channel, enable)); + return (PWM_CHANNEL_ENABLE(sc->dev, chan, enable)); } static int -pwmbus_channel_is_enabled(device_t bus, int channel, bool *enable) +pwmbus_channel_is_enabled(device_t bus, int chan, bool *enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_IS_ENABLED(sc->dev, channel, enable)); + return (PWM_CHANNEL_IS_ENABLED(sc->dev, chan, enable)); } static device_method_t pwmbus_methods[] = {