Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: ocelot-spi: Use spi_sync_transfer()

Use spi_sync_transfer() instead of hand-writing it.

It is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/7af920eb686b719cb7eb39c832e3ad414e0e1e1a.1712258667.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Christophe JAILLET and committed by
Lee Jones
74d26d76 7777dc1f

+1 -4
+1 -4
drivers/mfd/ocelot-spi.c
··· 145 145 struct device *dev = context; 146 146 struct ocelot_ddata *ddata; 147 147 struct spi_device *spi; 148 - struct spi_message msg; 149 148 unsigned int index = 0; 150 149 151 150 ddata = dev_get_drvdata(dev); ··· 165 166 xfers[index].len = val_size; 166 167 index++; 167 168 168 - spi_message_init_with_transfers(&msg, xfers, index); 169 - 170 - return spi_sync(spi, &msg); 169 + return spi_sync_transfer(spi, xfers, index); 171 170 } 172 171 173 172 static int ocelot_spi_regmap_bus_write(void *context, const void *data, size_t count)