1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

arm: allwinner: aw_gpio: Plug set but not used variable

Sponsored by:	Beckhoff Automation GmbH & Co. KG
This commit is contained in:
Emmanuel Vadot 2022-02-21 10:53:58 +01:00
parent aeb70a6707
commit 3dc60bab27

View File

@ -820,14 +820,13 @@ aw_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins,
uint32_t *pin_flags)
{
struct aw_gpio_softc *sc;
uint32_t bank, pin;
uint32_t pin;
int err;
sc = device_get_softc(dev);
if (first_pin > sc->conf->padconf->npins)
return (EINVAL);
bank = sc->conf->padconf->pins[first_pin].port;
if (sc->conf->padconf->pins[first_pin].pin != 0)
return (EINVAL);
@ -1309,20 +1308,21 @@ aw_gpio_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc,
struct resource *res, struct intr_map_data *data)
{
struct aw_gpio_softc *sc;
struct gpio_irqsrc *gi;
uint32_t irqcfg;
uint32_t pinidx, reg;
u_int irq, mode;
int err;
sc = device_get_softc(dev);
gi = (struct gpio_irqsrc *)isrc;
err = 0;
switch (data->type) {
case INTR_MAP_DATA_GPIO:
err = aw_gpio_pic_map_gpio(sc,
(struct intr_map_data_gpio *)data,
&irq, &mode);
if (err != 0)
return (err);
break;
default:
return (ENOTSUP);