mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
iio: amplifiers: hmc425a: Make use of device properties
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220203121624.75515-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
200da7ef7c
commit
201d11c508
@ -11,10 +11,10 @@
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/sysfs.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/sysfs.h>
|
||||
@ -192,7 +192,7 @@ static int hmc425a_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
st = iio_priv(indio_dev);
|
||||
st->type = (uintptr_t)of_device_get_match_data(&pdev->dev);
|
||||
st->type = (uintptr_t)device_get_match_data(&pdev->dev);
|
||||
|
||||
st->chip_info = &hmc425a_chip_info_tbl[st->type];
|
||||
indio_dev->num_channels = st->chip_info->num_channels;
|
||||
|
Loading…
Reference in New Issue
Block a user