Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2019 21:19:23 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349082 - head/sys/dev/pwm
Message-ID:  <201906152119.x5FLJNG0063363@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat Jun 15 21:19:23 2019
New Revision: 349082
URL: https://svnweb.freebsd.org/changeset/base/349082

Log:
  Spell unsigned int as u_int and channel as chan; eliminates the need to wrap
  some long lines.

Modified:
  head/sys/dev/pwm/pwmbus.c

Modified: head/sys/dev/pwm/pwmbus.c
==============================================================================
--- head/sys/dev/pwm/pwmbus.c	Sat Jun 15 20:54:33 2019	(r349081)
+++ head/sys/dev/pwm/pwmbus.c	Sat Jun 15 21:19:23 2019	(r349082)
@@ -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[] = {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906152119.x5FLJNG0063363>