iio: magnetometer: ak8975: Fix 'Unexpected device' error
authorAndré Apitzsch <git@apitzsch.eu>
Sun, 1 Oct 2023 16:09:56 +0000 (18:09 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 5 Oct 2023 14:54:45 +0000 (15:54 +0100)
commit848f68c760ab1e14a9046ea6e45e3304ab9fa50b
tree4ff26c676e2abab7b15dd0f5bd2175ca7588ff97
parent1c61848f53180e18e725290991da453fc59c80a4
iio: magnetometer: ak8975: Fix 'Unexpected device' error

Explicity specify array indices to fix mapping between
asahi_compass_chipset and ak_def_array.
While at it, remove unneeded AKXXXX.

Fixes: 4f9ea93afde1 ("iio: magnetometer: ak8975: Convert enum->pointer for data in the match tables")
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231001-ak_magnetometer-v1-1-09bf3b8798a3@apitzsch.eu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/ak8975.c