Skip to content
Commit a47ac019 authored by Hans de Goede's avatar Hans de Goede Committed by Jonathan Cameron
Browse files

iio: mma8452: Fix probe failing when an i2c_device_id is used

The mma8452_driver declares both of_match_table and i2c_driver.id_table
match-tables, but its probe() function only checked for of matches.

Add support for i2c_device_id matches. This fixes the driver not loading
on some x86 tablets (e.g. the Nextbook Ares 8) where the i2c_client is
instantiated by platform code using an i2c_device_id.

Drop of_match_ptr() protection to avoid unused warning.

Fixes: c3cdd6e4

 ("iio: mma8452: refactor for seperating chip specific data")
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220208124336.511884-1-hdegoede@redhat.com
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 15ea6bc0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment