]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 06:59:50 +0000 (08:59 +0200)
commit58c3a27e9c233bcb203624ce4f4132423fe3318d
treee6d0d85002b520d4d650be397fbb376b29a3d2e8
parent5ee016f6120ae6c64f9f8953405590e6d4b604e1
iio: mma8452: fix probe fail when device tree compatible is used.

[ Upstream commit fe18894930a025617114aa8ca0adbf94d5bffe89 ]

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: a47ac019e7e8 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/accel/mma8452.c