diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-03-13 13:49:54 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-03-21 13:27:05 +0300 |
commit | 92c3e93b7d2d8d9505f295d2caff58b91b407fa2 (patch) | |
tree | e1ec0a4c0ef339356c29684dc84ce4e401ae8602 /drivers/iio/humidity/hts221_buffer.c | |
parent | 4d8d2f09ad9fec7dcc1298541b0b12bd5dadf319 (diff) | |
download | linux-92c3e93b7d2d8d9505f295d2caff58b91b407fa2.tar.xz |
iio: humidity: hts221: Make use of device properties
Device property API allows to gather device resources from different sources,
such as ACPI. Convert the drivers to unleash the power of device property API.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/humidity/hts221_buffer.c')
-rw-r--r-- | drivers/iio/humidity/hts221_buffer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c index 5f142a44c1dd..9fb3f33614d4 100644 --- a/drivers/iio/humidity/hts221_buffer.c +++ b/drivers/iio/humidity/hts221_buffer.c @@ -77,7 +77,6 @@ int hts221_allocate_trigger(struct hts221_hw *hw) struct st_sensors_platform_data *pdata = dev_get_platdata(hw->dev); struct iio_dev *iio_dev = iio_priv_to_dev(hw); bool irq_active_low = false, open_drain = false; - struct device_node *np = hw->dev->of_node; unsigned long irq_type; int err; @@ -106,7 +105,7 @@ int hts221_allocate_trigger(struct hts221_hw *hw) if (err < 0) return err; - if ((np && of_property_read_bool(np, "drive-open-drain")) || + if (device_property_read_bool(hw->dev, "drive-open-drain") || (pdata && pdata->open_drain)) { irq_type |= IRQF_SHARED; open_drain = true; |