diff mbox series

[v3,1/7] iio: core: remove iio_priv_to_dev() helper

Message ID 20200621123345.2469-2-alexandru.ardelean@analog.com (mailing list archive)
State New, archived
Headers show
Series iio: core: wrap IIO device into an iio_dev_opaque object | expand

Commit Message

Alexandru Ardelean June 21, 2020, 12:33 p.m. UTC
All users of this helper have been updated to not use it.
Remove it now, so that we don't need to move it when creating the
iio_dev_opaque structure.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 include/linux/iio/iio.h | 6 ------
 1 file changed, 6 deletions(-)

Comments

Jonathan Cameron June 27, 2020, 3:12 p.m. UTC | #1
On Sun, 21 Jun 2020 15:33:39 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> All users of this helper have been updated to not use it.
> Remove it now, so that we don't need to move it when creating the
> iio_dev_opaque structure.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Applied to the togreg branch of iio.git and pushed out as testing
(note I discovered I'd not applied the at91-sama5d patch when I said I had
so noticed when doing local tests on this).

Thanks,

Jonathan

> ---
>  include/linux/iio/iio.h | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index 1c1d02107722..10a6d97a8e3e 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -703,12 +703,6 @@ static inline void *iio_priv(const struct iio_dev *indio_dev)
>  	return (char *)indio_dev + ALIGN(sizeof(struct iio_dev), IIO_ALIGN);
>  }
>  
> -static inline struct iio_dev *iio_priv_to_dev(void *priv)
> -{
> -	return (struct iio_dev *)((char *)priv -
> -				  ALIGN(sizeof(struct iio_dev), IIO_ALIGN));
> -}
> -
>  void iio_device_free(struct iio_dev *indio_dev);
>  struct iio_dev *devm_iio_device_alloc(struct device *parent, int sizeof_priv);
>  struct iio_trigger *devm_iio_trigger_alloc(struct device *dev,
diff mbox series

Patch

diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 1c1d02107722..10a6d97a8e3e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -703,12 +703,6 @@  static inline void *iio_priv(const struct iio_dev *indio_dev)
 	return (char *)indio_dev + ALIGN(sizeof(struct iio_dev), IIO_ALIGN);
 }
 
-static inline struct iio_dev *iio_priv_to_dev(void *priv)
-{
-	return (struct iio_dev *)((char *)priv -
-				  ALIGN(sizeof(struct iio_dev), IIO_ALIGN));
-}
-
 void iio_device_free(struct iio_dev *indio_dev);
 struct iio_dev *devm_iio_device_alloc(struct device *parent, int sizeof_priv);
 struct iio_trigger *devm_iio_trigger_alloc(struct device *dev,