Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). ts_nbus->data->ndescs is validated to be 8 during probe, so will have the same value as the hard-coded 8 that is removed by this change. Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx> --- drivers/bus/ts-nbus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bus/ts-nbus.c b/drivers/bus/ts-nbus.c index d3ee102a13893c83c50e41f7298821f4d7ae3487..31ae9a26257c3e0af2ba99666e0c04e882da935b 100644 --- a/drivers/bus/ts-nbus.c +++ b/drivers/bus/ts-nbus.c @@ -109,8 +109,7 @@ static void ts_nbus_reset_bus(struct ts_nbus *ts_nbus) values[0] = 0; - gpiod_set_array_value_cansleep(8, ts_nbus->data->desc, - ts_nbus->data->info, values); + gpiods_set_array_value_cansleep(ts_nbus->data, values); gpiod_set_value_cansleep(ts_nbus->csn, 0); gpiod_set_value_cansleep(ts_nbus->strobe, 0); gpiod_set_value_cansleep(ts_nbus->ale, 0); @@ -150,12 +149,11 @@ static int ts_nbus_read_byte(struct ts_nbus *ts_nbus, u8 *val) */ static void ts_nbus_write_byte(struct ts_nbus *ts_nbus, u8 byte) { - struct gpio_descs *gpios = ts_nbus->data; DECLARE_BITMAP(values, 8); values[0] = byte; - gpiod_set_array_value_cansleep(8, gpios->desc, gpios->info, values); + gpiods_set_array_value_cansleep(ts_nbus->data, values); } /* -- 2.43.0