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
This commit is contained in:
parent
5e86bd6073
commit
cfdb42f880
@ -386,7 +386,7 @@ amdgpio_attach(device_t dev)
|
|||||||
/* Initialize all possible pins to be Invalid */
|
/* Initialize all possible pins to be Invalid */
|
||||||
for (i = 0; i < AMD_GPIO_PINS_MAX ; i++) {
|
for (i = 0; i < AMD_GPIO_PINS_MAX ; i++) {
|
||||||
snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME,
|
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_pin = -1;
|
||||||
sc->sc_gpio_pins[i].gp_caps = 0;
|
sc->sc_gpio_pins[i].gp_caps = 0;
|
||||||
sc->sc_gpio_pins[i].gp_flags = 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++) {
|
for (i = 0; i < AMD_GPIO_PINS_EXPOSED ; i++) {
|
||||||
pin = kernzp_pins[i].pin_num;
|
pin = kernzp_pins[i].pin_num;
|
||||||
bank = pin/AMD_GPIO_PINS_PER_BANK;
|
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);
|
AMD_GPIO_PREFIX, bank, kernzp_pins[i].pin_name);
|
||||||
sc->sc_gpio_pins[pin].gp_pin = pin;
|
sc->sc_gpio_pins[pin].gp_pin = pin;
|
||||||
sc->sc_gpio_pins[pin].gp_caps = AMDGPIO_DEFAULT_CAPS;
|
sc->sc_gpio_pins[pin].gp_caps = AMDGPIO_DEFAULT_CAPS;
|
||||||
sc->sc_gpio_pins[pin].gp_flags = (amdgpio_is_pin_output(sc, pin)?
|
sc->sc_gpio_pins[pin].gp_flags =
|
||||||
GPIO_PIN_OUTPUT : GPIO_PIN_INPUT);
|
amdgpio_is_pin_output(sc, pin) ?
|
||||||
|
GPIO_PIN_OUTPUT : GPIO_PIN_INPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
sc->sc_busdev = gpiobus_attach_bus(dev);
|
sc->sc_busdev = gpiobus_attach_bus(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user