Re: [PATCH v3 1/2] iio: addac: stx104: Migrate to the regmap API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> > +	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






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux