summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-74x164.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-06-17 18:39:28 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-06-23 11:07:12 +0200
commit771d899adde8e07969bd430932cca1fc3de0000e (patch)
tree58661930f9c6b1b01e0da84201191547e47d02b3 /drivers/gpio/gpio-74x164.c
parent99468c1af913bb5662c223b68e783b4bf9200184 (diff)
gpio: 74x164: Use spi_write() helper instead of open coding
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-74x164.c')
-rw-r--r--drivers/gpio/gpio-74x164.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index 80f9ddf13343..a6607faf2fdf 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -35,13 +35,8 @@ struct gen_74x164_chip {
static int __gen_74x164_write_config(struct gen_74x164_chip *chip)
{
- struct spi_transfer xfer = {
- .tx_buf = chip->buffer,
- .len = chip->registers,
- };
-
- return spi_sync_transfer(to_spi_device(chip->gpio_chip.parent),
- &xfer, 1);
+ return spi_write(to_spi_device(chip->gpio_chip.parent), chip->buffer,
+ chip->registers);
}
static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset)