iio: accel: mma8452: Convert enum->pointer for data in the ID table
authorBiju Das <biju.das.jz@bp.renesas.com>
Fri, 18 Aug 2023 18:40:32 +0000 (19:40 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 11 Sep 2023 19:12:41 +0000 (20:12 +0100)
commit0f8eaeda7659d02063278c7eb72bbcd2d2819375
tree920e0569f36faac86d681e8aac7c4004f69fc60b
parent974a6c27b4d707f75d283805e7fc8aa54686f198
iio: accel: mma8452: Convert enum->pointer for data in the ID table

Convert enum->pointer for data in the ID table, so that
device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
bus type match support added to it.

Replace enum->struct *mma_chip_info for data in the ID table and simplify
mma8452_probe() by replacing device_get_match_data() with
i2c_get_match_data().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230818184033.335502-2-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/mma8452.c