[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230401144906.709558bd@jic23-huawei>
Date: Sat, 1 Apr 2023 14:49:06 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: William Breathitt Gray <william.gray@...aro.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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
Powered by blists - more mailing lists