iio:chemical:vz89x: Drop of_match_ptr protection and use generic fw accessors
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 10 Sep 2020 17:32:33 +0000 (18:32 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Sep 2020 17:41:32 +0000 (18:41 +0100)
commitb3fce99a57377673eaf7c89ae9a42f4fd60966e2
tree7e4354309be96b381cb52858198ff119afa47e11
parente12b3a6150f1ce271e2a5282d3cfd116a144d796
iio:chemical:vz89x: Drop of_match_ptr protection and use generic fw accessors

This change allow the driver to be used with ACPI PRP0001 and removes
an antipattern that I want to avoid being copied into new IIO drivers.

The handling of match_data uses a different approach as
device_get_match_data() doesn't distinguish between no match, and
a match but with NULL data.

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-30-jic23@kernel.org
drivers/iio/chemical/vz89x.c