]> git.baikalelectronics.ru Git - kernel.git/commit
iio: mma8452: fix probe fail when device tree compatible is used.
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 25 Apr 2022 08:41:00 +0000 (16:41 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 May 2022 16:43:25 +0000 (17:43 +0100)
commit756ab24b4776cc1cc234dbad63dfc0e377026fe5
tree90f32875442ab44ec807eed424f643dec6244bd0
parenteae8398f7a44ae4fbaaac9c5bd4ee973c69f0abe
iio: mma8452: fix probe fail when device tree compatible is used.

Correct the logic for the probe. First check of_match_table, if
not meet, then check i2c_driver.id_table. If both not meet, then
return fail.

Fixes: a708770a4fa8 ("iio: mma8452: Fix probe failing when an i2c_device_id is used")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/1650876060-17577-1-git-send-email-haibo.chen@nxp.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/mma8452.c