Date: Fri, 24 May 2019 06:02:51 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348227 - head/sys/dev/amdgpio Message-ID: <201905240602.x4O62pFK042164@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri May 24 06:02:51 2019 New Revision: 348227 URL: https://svnweb.freebsd.org/changeset/base/348227 Log: amdgpio: remove new line symbols from pin names That made, for example, gpioc -l output quite hard to read and parse. Also, fix formatting of a nearby statement with too long lines. MFC after: 2 weeks Modified: head/sys/dev/amdgpio/amdgpio.c Modified: head/sys/dev/amdgpio/amdgpio.c ============================================================================== --- head/sys/dev/amdgpio/amdgpio.c Fri May 24 05:47:16 2019 (r348226) +++ head/sys/dev/amdgpio/amdgpio.c Fri May 24 06:02:51 2019 (r348227) @@ -386,7 +386,7 @@ amdgpio_attach(device_t dev) /* Initialize all possible pins to be Invalid */ for (i = 0; i < AMD_GPIO_PINS_MAX ; i++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, - "Unexposed PIN %d\n", i); + "Unexposed PIN %d", i); sc->sc_gpio_pins[i].gp_pin = -1; sc->sc_gpio_pins[i].gp_caps = 0; sc->sc_gpio_pins[i].gp_flags = 0; @@ -396,12 +396,13 @@ amdgpio_attach(device_t dev) for (i = 0; i < AMD_GPIO_PINS_EXPOSED ; i++) { pin = kernzp_pins[i].pin_num; bank = pin/AMD_GPIO_PINS_PER_BANK; - snprintf(sc->sc_gpio_pins[pin].gp_name, GPIOMAXNAME, "%s%d_%s\n", + snprintf(sc->sc_gpio_pins[pin].gp_name, GPIOMAXNAME, "%s%d_%s", AMD_GPIO_PREFIX, bank, kernzp_pins[i].pin_name); sc->sc_gpio_pins[pin].gp_pin = pin; sc->sc_gpio_pins[pin].gp_caps = AMDGPIO_DEFAULT_CAPS; - sc->sc_gpio_pins[pin].gp_flags = (amdgpio_is_pin_output(sc, pin)? - GPIO_PIN_OUTPUT : GPIO_PIN_INPUT); + sc->sc_gpio_pins[pin].gp_flags = + amdgpio_is_pin_output(sc, pin) ? + GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; } sc->sc_busdev = gpiobus_attach_bus(dev);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905240602.x4O62pFK042164>