w1: ds2490: USB transfer buffers need to be DMAable
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Wed, 18 Jan 2017 20:31:11 +0000 (21:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 10:46:42 +0000 (11:46 +0100)
commit61cd1b4cd1e8f7f7642ab64529d9bd52e8374641
treea29a64583ef19a65b158eac81e8f345ad66cb9ad
parent8333eb153a9fd86028abd0942c6aec0705764410
w1: ds2490: USB transfer buffers need to be DMAable

ds2490 driver was doing USB transfers from / to buffers on a stack.
This is not permitted and made the driver non-working with vmapped stacks.

Since all these transfers are done under the same bus_mutex lock we can
simply use shared buffers in a device private structure for two most common
of them.

While we are at it, let's also fix a comparison between int and size_t in
ds9490r_search() which made the driver spin in this function if state
register get requests were failing.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Cc: stable <stable@vger.kernel.org>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/ds2490.c