]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_sensorhub: Allocate sensorhub resource before claiming sensors
authorGwendal Grignou <gwendal@chromium.org>
Mon, 27 Apr 2020 22:59:02 +0000 (15:59 -0700)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Wed, 29 Apr 2020 21:17:45 +0000 (23:17 +0200)
commitd4490b76bee5ad4ef18c161d0127d91b60ccd152
treef55db54f3e521f0e2ce5e50cd99849170ea0933d
parent22b1bb97f68e4c6ec8a855719aa02efcfd197771
platform/chrome: cros_ec_sensorhub: Allocate sensorhub resource before claiming sensors

Allocate callbacks array before enumerating the sensors: The probe routine
for these sensors (for instance cros_ec_sensors_probe) can be called
within the sensorhub probe routine (cros_ec_sensors_probe())

Fixes: 9e68f8082ce32 ("platform/chrome: cros_ec_sensorhub: Add FIFO support")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reported-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_ec_sensorhub.c
drivers/platform/chrome/cros_ec_sensorhub_ring.c
include/linux/platform_data/cros_ec_sensorhub.h