gpio: 74x164: Use spi_write() helper instead of open coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 17 Jun 2016 16:39:28 +0000 (18:39 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 23 Jun 2016 09:07:12 +0000 (11:07 +0200)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-74x164.c

index 80f9ddf13343c67edca44cc0fdf609882e71c868..a6607faf2fdf822e998d7c67ea60c8745949df76 100644 (file)
@@ -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)