All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Ardelean <aardelean@deviqon.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/5] iio: accel: mma9551/mma9553: Drop explicit ACPI match support
Date: Mon, 24 May 2021 10:28:57 +0300	[thread overview]
Message-ID: <CAASAkob6b-e5Vw1r0UYHfbQx0-PLSB19w=mvyzba=OWx0iTmOQ@mail.gmail.com> (raw)
In-Reply-To: <20210523162315.1965869-2-jic23@kernel.org>

On Sun, 23 May 2021 at 19:24, Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> The IDs look highly suspicious as they are just the part numbers in
> capitals, so lets drop these if no one screams.
>

I think some headers (at least acpi.h) could be removed with this patch.
Other than that:

Reviewed-by: Alexandru Ardelean <aardelean@deviqon.com>

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
>  drivers/iio/accel/mma9551.c | 21 ---------------------
>  drivers/iio/accel/mma9553.c | 21 ---------------------
>  2 files changed, 42 deletions(-)
>
> diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
> index 4c359fb05480..2b74f67536a3 100644
> --- a/drivers/iio/accel/mma9551.c
> +++ b/drivers/iio/accel/mma9551.c
> @@ -435,17 +435,6 @@ static int mma9551_gpio_probe(struct iio_dev *indio_dev)
>         return 0;
>  }
>
> -static const char *mma9551_match_acpi_device(struct device *dev)
> -{
> -       const struct acpi_device_id *id;
> -
> -       id = acpi_match_device(dev->driver->acpi_match_table, dev);
> -       if (!id)
> -               return NULL;
> -
> -       return dev_name(dev);
> -}
> -
>  static int mma9551_probe(struct i2c_client *client,
>                          const struct i2c_device_id *id)
>  {
> @@ -464,8 +453,6 @@ static int mma9551_probe(struct i2c_client *client,
>
>         if (id)
>                 name = id->name;
> -       else if (ACPI_HANDLE(&client->dev))
> -               name = mma9551_match_acpi_device(&client->dev);
>
>         ret = mma9551_init(data);
>         if (ret < 0)
> @@ -591,13 +578,6 @@ static const struct dev_pm_ops mma9551_pm_ops = {
>                            mma9551_runtime_resume, NULL)
>  };
>
> -static const struct acpi_device_id mma9551_acpi_match[] = {
> -       {"MMA9551", 0},
> -       {},
> -};
> -
> -MODULE_DEVICE_TABLE(acpi, mma9551_acpi_match);
> -
>  static const struct i2c_device_id mma9551_id[] = {
>         {"mma9551", 0},
>         {}
> @@ -608,7 +588,6 @@ MODULE_DEVICE_TABLE(i2c, mma9551_id);
>  static struct i2c_driver mma9551_driver = {
>         .driver = {
>                    .name = MMA9551_DRV_NAME,
> -                  .acpi_match_table = ACPI_PTR(mma9551_acpi_match),
>                    .pm = &mma9551_pm_ops,
>                    },
>         .probe = mma9551_probe,
> diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c
> index ba3ecb3b57dc..32c9a79ebfec 100644
> --- a/drivers/iio/accel/mma9553.c
> +++ b/drivers/iio/accel/mma9553.c
> @@ -1062,17 +1062,6 @@ static irqreturn_t mma9553_event_handler(int irq, void *private)
>         return IRQ_HANDLED;
>  }
>
> -static const char *mma9553_match_acpi_device(struct device *dev)
> -{
> -       const struct acpi_device_id *id;
> -
> -       id = acpi_match_device(dev->driver->acpi_match_table, dev);
> -       if (!id)
> -               return NULL;
> -
> -       return dev_name(dev);
> -}
> -
>  static int mma9553_probe(struct i2c_client *client,
>                          const struct i2c_device_id *id)
>  {
> @@ -1091,8 +1080,6 @@ static int mma9553_probe(struct i2c_client *client,
>
>         if (id)
>                 name = id->name;
> -       else if (ACPI_HANDLE(&client->dev))
> -               name = mma9553_match_acpi_device(&client->dev);
>         else
>                 return -ENOSYS;
>
> @@ -1230,13 +1217,6 @@ static const struct dev_pm_ops mma9553_pm_ops = {
>                            mma9553_runtime_resume, NULL)
>  };
>
> -static const struct acpi_device_id mma9553_acpi_match[] = {
> -       {"MMA9553", 0},
> -       {},
> -};
> -
> -MODULE_DEVICE_TABLE(acpi, mma9553_acpi_match);
> -
>  static const struct i2c_device_id mma9553_id[] = {
>         {"mma9553", 0},
>         {},
> @@ -1247,7 +1227,6 @@ MODULE_DEVICE_TABLE(i2c, mma9553_id);
>  static struct i2c_driver mma9553_driver = {
>         .driver = {
>                    .name = MMA9553_DRV_NAME,
> -                  .acpi_match_table = ACPI_PTR(mma9553_acpi_match),
>                    .pm = &mma9553_pm_ops,
>                    },
>         .probe = mma9553_probe,
> --
> 2.31.1
>

  parent reply	other threads:[~2021-05-24  7:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 16:23 [PATCH 0/5] iio: accel: mma9551/mma9553 Cleanup and update Jonathan Cameron
2021-05-23 16:23 ` [PATCH 1/5] iio: accel: mma9551/mma9553: Drop explicit ACPI match support Jonathan Cameron
2021-05-23 19:17   ` Andy Shevchenko
2021-05-24  7:28   ` Alexandru Ardelean [this message]
2021-05-23 16:23 ` [PATCH 2/5] iio: accel: mma9551/mma9553: Simplify pm logic Jonathan Cameron
2021-05-24  7:33   ` Alexandru Ardelean
2021-05-23 16:23 ` [PATCH 3/5] iio: accel: mma9551: Add support to get irqs directly from fwnode Jonathan Cameron
2021-05-24  6:13   ` Andy Shevchenko
2021-05-24  9:27     ` Jonathan Cameron
2021-06-03 18:40       ` Jonathan Cameron
2021-05-24  8:16   ` Alexandru Ardelean
2021-05-23 16:23 ` [PATCH 4/5] iio: accel: mma9551: Use devm managed functions to tidy up probe() Jonathan Cameron
2021-05-24  8:13   ` Alexandru Ardelean
2021-05-23 16:23 ` [PATCH 5/5] iio: accel: mma9553: " Jonathan Cameron
2021-05-24  8:15   ` Alexandru Ardelean

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='CAASAkob6b-e5Vw1r0UYHfbQx0-PLSB19w=mvyzba=OWx0iTmOQ@mail.gmail.com' \
    --to=aardelean@deviqon.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.