From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/8] iio: core: drop devm_iio_trigger_free() API call
Date: Sun, 12 Apr 2020 13:57:23 +0100 [thread overview]
Message-ID: <20200412135723.4b80bfce@archlinux> (raw)
In-Reply-To: <20200227135227.12433-5-alexandru.ardelean@analog.com>
On Thu, 27 Feb 2020 15:52:24 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> It's unused so far, so it can't be removed. Also makes sense to remove it
> to discourage weird uses of this call during review.
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied. For reasons I'm not sure of the character encoding
on these seems to be messed up. I'm fixing it by hand, so hopefully
it won't break anything.
Thanks,
Jonathan
> ---
> .../driver-api/driver-model/devres.rst | 1 -
> Documentation/driver-api/iio/triggers.rst | 1 -
> drivers/iio/industrialio-trigger.c | 32 -------------------
> include/linux/iio/iio.h | 2 --
> 4 files changed, 36 deletions(-)
>
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index f638a035e6d2..6c401c74e480 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -289,7 +289,6 @@ IIO
> devm_iio_kfifo_free()
> devm_iio_triggered_buffer_setup()
> devm_iio_trigger_alloc()
> - devm_iio_trigger_free()
> devm_iio_trigger_register()
> devm_iio_channel_get()
> devm_iio_channel_release()
> diff --git a/Documentation/driver-api/iio/triggers.rst b/Documentation/driver-api/iio/triggers.rst
> index 160faa810d12..dfd7ba3eabde 100644
> --- a/Documentation/driver-api/iio/triggers.rst
> +++ b/Documentation/driver-api/iio/triggers.rst
> @@ -4,7 +4,6 @@ Triggers
>
> * struct :c:type:`iio_trigger` — industrial I/O trigger device
> * :c:func:`devm_iio_trigger_alloc` — Resource-managed iio_trigger_alloc
> -* :c:func:`devm_iio_trigger_free` — Resource-managed iio_trigger_free
> * :c:func:`devm_iio_trigger_register` — Resource-managed iio_trigger_register
> iio_trigger_unregister
> * :c:func:`iio_trigger_validate_own_device` — Check if a trigger and IIO
> diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> index 611f608a9da2..53d1931f6be8 100644
> --- a/drivers/iio/industrialio-trigger.c
> +++ b/drivers/iio/industrialio-trigger.c
> @@ -585,18 +585,6 @@ static void devm_iio_trigger_release(struct device *dev, void *res)
> iio_trigger_free(*(struct iio_trigger **)res);
> }
>
> -static int devm_iio_trigger_match(struct device *dev, void *res, void *data)
> -{
> - struct iio_trigger **r = res;
> -
> - if (!r || !*r) {
> - WARN_ON(!r || !*r);
> - return 0;
> - }
> -
> - return *r == data;
> -}
> -
> /**
> * devm_iio_trigger_alloc - Resource-managed iio_trigger_alloc()
> * @dev: Device to allocate iio_trigger for
> @@ -608,9 +596,6 @@ static int devm_iio_trigger_match(struct device *dev, void *res, void *data)
> * Managed iio_trigger_alloc. iio_trigger allocated with this function is
> * automatically freed on driver detach.
> *
> - * If an iio_trigger allocated with this function needs to be freed separately,
> - * devm_iio_trigger_free() must be used.
> - *
> * RETURNS:
> * Pointer to allocated iio_trigger on success, NULL on failure.
> */
> @@ -640,23 +625,6 @@ struct iio_trigger *devm_iio_trigger_alloc(struct device *dev,
> }
> EXPORT_SYMBOL_GPL(devm_iio_trigger_alloc);
>
> -/**
> - * devm_iio_trigger_free - Resource-managed iio_trigger_free()
> - * @dev: Device this iio_dev belongs to
> - * @iio_trig: the iio_trigger associated with the device
> - *
> - * Free iio_trigger allocated with devm_iio_trigger_alloc().
> - */
> -void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig)
> -{
> - int rc;
> -
> - rc = devres_release(dev, devm_iio_trigger_release,
> - devm_iio_trigger_match, iio_trig);
> - WARN_ON(rc);
> -}
> -EXPORT_SYMBOL_GPL(devm_iio_trigger_free);
> -
> static void devm_iio_trigger_unreg(struct device *dev, void *res)
> {
> iio_trigger_unregister(*(struct iio_trigger **)res);
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index 2920c065ab9b..1a5d3d630ec1 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -689,8 +689,6 @@ void iio_device_free(struct iio_dev *indio_dev);
> struct iio_dev *devm_iio_device_alloc(struct device *dev, int sizeof_priv);
> struct iio_trigger *devm_iio_trigger_alloc(struct device *dev,
> const char *fmt, ...);
> -void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig);
> -
> /**
> * iio_buffer_enabled() - helper function to test if the buffer is enabled
> * @indio_dev: IIO device structure for device
next prev parent reply other threads:[~2020-04-12 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 13:52 [PATCH 1/8] iio: core: drop devm_iio_device_unregister() API call Alexandru Ardelean
2020-02-27 13:52 ` [PATCH 2/8] iio: core: drop devm_iio_triggered_buffer_cleanup() " Alexandru Ardelean
2020-04-12 12:33 ` Jonathan Cameron
2020-02-27 13:52 ` [PATCH 3/8] iio: core: drop devm_iio_device_free() " Alexandru Ardelean
2020-04-12 12:36 ` Jonathan Cameron
2020-02-27 13:52 ` [PATCH 4/8] iio: core: drop devm_iio_trigger_unregister() " Alexandru Ardelean
2020-04-12 12:51 ` Jonathan Cameron
2020-02-27 13:52 ` [PATCH 5/8] iio: core: drop devm_iio_trigger_free() " Alexandru Ardelean
2020-04-12 12:57 ` Jonathan Cameron [this message]
2020-02-27 13:52 ` [PATCH 6/8] iio: inkern: drop devm_iio_channel_release{_all} API calls Alexandru Ardelean
2020-04-12 12:58 ` Jonathan Cameron
2020-02-27 13:52 ` [PATCH 7/8] iio: buffer: drop devm_iio_hw_consumer_free() API call Alexandru Ardelean
2020-04-12 13:00 ` Jonathan Cameron
2020-02-27 13:52 ` [PATCH 8/8] iio: buffer: drop devm_iio_kfifo_free() " Alexandru Ardelean
2020-04-12 13:01 ` Jonathan Cameron
2020-04-12 14:21 ` Ardelean, Alexandru
2020-03-16 9:09 ` [PATCH 1/8] iio: core: drop devm_iio_device_unregister() " Ardelean, Alexandru
2020-03-16 11:45 ` Jonathan Cameron
2020-04-12 11:55 ` 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=20200412135723.4b80bfce@archlinux \
--to=jic23@kernel.org \
--cc=alexandru.ardelean@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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.