diff options
-rw-r--r-- | drivers/gpio/gpio-aggregator.c | 3 | ||||
-rw-r--r-- | include/linux/gpio/machine.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c index 40a081b095fb..13e473c97ce4 100644 --- a/drivers/gpio/gpio-aggregator.c +++ b/drivers/gpio/gpio-aggregator.c @@ -72,8 +72,7 @@ static int aggr_add_gpio(struct gpio_aggregator *aggr, const char *key, if (!lookups) return -ENOMEM; - lookups->table[*n] = - (struct gpiod_lookup)GPIO_LOOKUP_IDX(key, hwnum, NULL, *n, 0); + lookups->table[*n] = GPIO_LOOKUP_IDX(key, hwnum, NULL, *n, 0); (*n)++; memset(&lookups->table[*n], 0, sizeof(lookups->table[*n])); diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h index 781a053abbb9..d755e529c1e3 100644 --- a/include/linux/gpio/machine.h +++ b/include/linux/gpio/machine.h @@ -75,7 +75,7 @@ struct gpiod_hog { * gpiod_get_index() */ #define GPIO_LOOKUP_IDX(_key, _chip_hwnum, _con_id, _idx, _flags) \ -{ \ +(struct gpiod_lookup) { \ .key = _key, \ .chip_hwnum = _chip_hwnum, \ .con_id = _con_id, \ @@ -87,7 +87,7 @@ struct gpiod_hog { * Simple definition of a single GPIO hog in an array. */ #define GPIO_HOG(_chip_label, _chip_hwnum, _line_name, _lflags, _dflags) \ -{ \ +(struct gpiod_hog) { \ .chip_label = _chip_label, \ .chip_hwnum = _chip_hwnum, \ .line_name = _line_name, \ |