From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, Denis Ciocca <denis.ciocca@st.com>
Subject: Re: [PATCH v2 7/8] iio: humidity: hts221: Make use of device properties
Date: Sun, 15 Mar 2020 12:43:27 +0000 [thread overview]
Message-ID: <20200315124327.56e31b1c@archlinux> (raw)
In-Reply-To: <20200313104955.30423-7-andriy.shevchenko@linux.intel.com>
On Fri, 13 Mar 2020 12:49:54 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 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>
Applied.
Thanks,
Jonathan
> ---
> v2: new patch
> drivers/iio/humidity/hts221_buffer.c | 3 +--
> drivers/iio/humidity/hts221_i2c.c | 2 +-
> drivers/iio/humidity/hts221_spi.c | 2 +-
> 3 files changed, 3 insertions(+), 4 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;
> diff --git a/drivers/iio/humidity/hts221_i2c.c b/drivers/iio/humidity/hts221_i2c.c
> index 4272b7030c44..1398794e4bc7 100644
> --- a/drivers/iio/humidity/hts221_i2c.c
> +++ b/drivers/iio/humidity/hts221_i2c.c
> @@ -63,7 +63,7 @@ static struct i2c_driver hts221_driver = {
> .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,
> diff --git a/drivers/iio/humidity/hts221_spi.c b/drivers/iio/humidity/hts221_spi.c
> index 055dba8897d2..ba1115489c2c 100644
> --- a/drivers/iio/humidity/hts221_spi.c
> +++ b/drivers/iio/humidity/hts221_spi.c
> @@ -56,7 +56,7 @@ static struct spi_driver hts221_driver = {
> .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,
next prev parent reply other threads:[~2020-03-15 12:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 10:49 [PATCH v2 1/8] iio: light: st_uvis25: Drop unneeded casting when print error code Andy Shevchenko
2020-03-13 10:49 ` [PATCH v2 2/8] iio: st_sensors: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:34 ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 3/8] iio: st_sensors: Drop unneeded explicit castings Andy Shevchenko
2020-03-15 12:38 ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 4/8] iio: st_sensors: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:40 ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 5/8] iio: st_sensors: Join string literals back Andy Shevchenko
2020-03-15 12:40 ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 6/8] iio: humidity: hts221: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:42 ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 7/8] iio: humidity: hts221: Make use of device properties Andy Shevchenko
2020-03-15 12:43 ` Jonathan Cameron [this message]
2020-03-13 10:49 ` [PATCH v2 8/8] iio: humidity: hts221: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:44 ` Jonathan Cameron
2020-03-16 8:27 ` Andy Shevchenko
2020-03-15 12:26 ` [PATCH v2 1/8] iio: light: st_uvis25: " Jonathan Cameron
2020-03-15 12:31 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200315124327.56e31b1c@archlinux \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=denis.ciocca@st.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).