w1/masters/ds2490: queue up found IDs during scan
authorChristian Vogel <vogelchr@vogel.cx>
Wed, 13 Jan 2021 19:50:18 +0000 (20:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jan 2021 17:50:21 +0000 (18:50 +0100)
commite3fe0e89fec6965342434e7acae7ed6e6f021d08
treece3f47455ff4baf31257df72968eac2445f27bbc
parent48b7de6687f6ed597ef7162151f1c35469775545
w1/masters/ds2490: queue up found IDs during scan

Queue up found IDs in a buffer and run the callback once for each found ID
at the end. This is necessary because we hold the bus_mutex during the
whole scan, and some of the "add-device" callbacks deadlock as they
themselves want to mutex_lock(bus_mutex).

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Link: https://lore.kernel.org/r/20210113195018.7498-3-vogelchr@vogel.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/ds2490.c