lkml.org 
[lkml]   [2023]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] iio: addac: stx104: Migrate to the regmap API

>
> > + gpio_config = (struct gpio_regmap_config) {
> > + .parent = dev,
> > + .regmap = dio_map,
> > + .ngpio = STX104_NGPIO,
> > + .names = stx104_names,
> > + .reg_dat_base = GPIO_REGMAP_ADDR(STX104_DIO_REG),
> > + .reg_set_base = GPIO_REGMAP_ADDR(STX104_DIO_REG),
> > + .ngpio_per_reg = STX104_NGPIO,
> > + .reg_mask_xlate = stx104_reg_mask_xlate,
> > + .drvdata = dio_map,
> > + };
>
> Not sure of compound literal is good to have in such case, but if
> Jonathan asked for that...

I didn't like the separately zeroing of the structure in a different
place in the code. This avoids that (but then so would using an explicit
memset just before filling the rest in.)

Jonathan



\
 
 \ /
  Last update: 2023-04-01 15:34    [W:0.066 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site