Skip to content

Commit

Permalink
gpio: 74x164: Use spi_write() helper instead of open coding
Browse files Browse the repository at this point in the history
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
geertu authored and linusw committed Jun 23, 2016
1 parent 99468c1 commit 771d899
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/gpio/gpio-74x164.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 771d899

Please sign in to comment.