Date: Sat, 15 Jun 2019 21:36:15 +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: r349084 - in head/sys: arm/allwinner dev/pwm Message-ID: <201906152136.x5FLaFCV073795@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sat Jun 15 21:36:14 2019 New Revision: 349084 URL: https://svnweb.freebsd.org/changeset/base/349084 Log: Rename the channel_max method to channel_count, because that's what it's returning. (If the channel count is 2, then the max channel number is 1.) Modified: head/sys/arm/allwinner/aw_pwm.c head/sys/dev/pwm/pwm_if.m head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmc.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:36:14 2019 (r349084) @@ -226,7 +226,7 @@ aw_pwm_detach(device_t dev) } static int -aw_pwm_channel_max(device_t dev, int *nchannel) +aw_pwm_channel_count(device_t dev, int *nchannel) { *nchannel = 1; @@ -363,7 +363,7 @@ static device_method_t aw_pwm_methods[] = { /* pwm interface */ DEVMETHOD(pwm_get_bus, aw_pwm_get_bus), - DEVMETHOD(pwm_channel_max, aw_pwm_channel_max), + DEVMETHOD(pwm_channel_count, aw_pwm_channel_count), DEVMETHOD(pwm_channel_config, aw_pwm_channel_config), DEVMETHOD(pwm_channel_get_config, aw_pwm_channel_get_config), DEVMETHOD(pwm_channel_enable, aw_pwm_channel_enable), Modified: head/sys/dev/pwm/pwm_if.m ============================================================================== --- head/sys/dev/pwm/pwm_if.m Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwm_if.m Sat Jun 15 21:36:14 2019 (r349084) @@ -100,7 +100,7 @@ METHOD int channel_is_enabled { # # Get the number of channels # -METHOD int channel_max { +METHOD int channel_count { device_t dev; int *nchannel; }; Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:36:14 2019 (r349084) @@ -78,7 +78,7 @@ pwmbus_attach(device_t dev) sc->busdev = dev; sc->dev = device_get_parent(dev); - if (PWM_CHANNEL_MAX(sc->dev, &sc->nchannels) != 0 || + if (PWM_CHANNEL_COUNT(sc->dev, &sc->nchannels) != 0 || sc->nchannels == 0) return (ENXIO); Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 21:36:14 2019 (r349084) @@ -67,7 +67,7 @@ pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, switch (cmd) { case PWMMAXCHANNEL: nchannel = -1; - rv = PWM_CHANNEL_MAX(sc->pdev, &nchannel); + rv = PWM_CHANNEL_COUNT(sc->pdev, &nchannel); bcopy(&nchannel, data, sizeof(nchannel)); break; case PWMSETSTATE:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906152136.x5FLaFCV073795>