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>
        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;
 
        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;
 
        .driver = {
                .name = "hts221_i2c",
                .pm = &hts221_pm_ops,
-               .of_match_table = of_match_ptr(hts221_i2c_of_match),
+               .of_match_table = hts221_i2c_of_match,
                .acpi_match_table = ACPI_PTR(hts221_acpi_match),
        },
        .probe = hts221_i2c_probe,
 
        .driver = {
                .name = "hts221_spi",
                .pm = &hts221_pm_ops,
-               .of_match_table = of_match_ptr(hts221_spi_of_match),
+               .of_match_table = hts221_spi_of_match,
        },
        .probe = hts221_spi_probe,
        .id_table = hts221_spi_id_table,