iio:chemical:atlas-sensor: Drop of_match_ptr and use generic fw accessors
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 10 Sep 2020 17:32:29 +0000 (18:32 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Sep 2020 17:41:31 +0000 (18:41 +0100)
commita867e8986759bf25251c8cad3798cba0e4c25a6e
tree01d90dd36c3f8d017deb36a9d85f5c51976bb129
parent4d36d4df68d3db9aca1e0785f464b5092f39952b
iio:chemical:atlas-sensor: Drop of_match_ptr and use generic fw accessors

of_match_ptr() prevents use of this driver with ACPI via PRP0001 and is
an example of an anti pattern I'm trying to remove from IIO.
Hence drop from this driver and use generic fw accessors to check
if there is a fw_node and get the id.

It might be neater to use pointers rather than indexes for
the device_data but that is another issue and should be handled
separately.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20200910173242.621168-26-jic23@kernel.org
drivers/iio/chemical/atlas-sensor.c