[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3e01389e-a18b-a9d9-677a-dd1258417c94@axentia.se>
Date: Sat, 14 Jul 2018 21:51:49 +0200
From: Peter Rosin <peda@...ntia.se>
To: Lars-Peter Clausen <lars@...afoo.de>,
Mircea Caprioru <mircea.caprioru@...log.com>
Cc: davem@...emloft.net, mchehab+samsung@...nel.org,
akpm@...ux-foundation.org, rdunlap@...radead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mux:adgs1408/1409: New driver for Analog Devices ADGS1408/1409 mux …
On 2018-07-14 16:02, Lars-Peter Clausen wrote:
> On 07/14/2018 02:04 PM, Peter Rosin wrote:
> [...]
>>> +static int adgs140x_spi_reg_write(struct spi_device *spi,
>>> + u8 reg_addr, u8 reg_data)
>>> +{
>>> + u8 tx_buf[2];
>>> +
>>> + tx_buf[0] = reg_addr;
>>> + tx_buf[1] = reg_data;
>>> +
>>> + return spi_write_then_read(spi, tx_buf, sizeof(tx_buf), NULL, 0);
>>
>> return spi_write(spi, tx_buf, sizeof(tx_buf));
>
> Be aware spi_write_then_read() can handle on stack buffers, spi_write() can't.
>
How obvious...
But ok, I guess the ugliness is warranted.
Cheers,
Peter
Powered by blists - more mailing lists