Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ad7944: remove unused parameter
@ 2024-05-24 20:38 David Lechner
  2024-05-25 17:30 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: David Lechner @ 2024-05-24 20:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Michael Hennerich, Nuno Sá, linux-iio,
	linux-kernel

In the ad7944 driver, the ad7944_convert_and_acquire() had an unused
`chan` parameter. This patch removes the parameter.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/iio/adc/ad7944.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/adc/ad7944.c b/drivers/iio/adc/ad7944.c
index 4602ab5ed2a6..e2cb64cef476 100644
--- a/drivers/iio/adc/ad7944.c
+++ b/drivers/iio/adc/ad7944.c
@@ -259,7 +259,6 @@ static int ad7944_chain_mode_init_msg(struct device *dev, struct ad7944_adc *adc
 /**
  * ad7944_convert_and_acquire - Perform a single conversion and acquisition
  * @adc: The ADC device structure
- * @chan: The channel specification
  * Return: 0 on success, a negative error code on failure
  *
  * Perform a conversion and acquisition of a single sample using the
@@ -268,8 +267,7 @@ static int ad7944_chain_mode_init_msg(struct device *dev, struct ad7944_adc *adc
  * Upon successful return adc->sample.raw will contain the conversion result
  * (or adc->chain_mode_buf if the device is using chain mode).
  */
-static int ad7944_convert_and_acquire(struct ad7944_adc *adc,
-				      const struct iio_chan_spec *chan)
+static int ad7944_convert_and_acquire(struct ad7944_adc *adc)
 {
 	int ret;
 
@@ -291,7 +289,7 @@ static int ad7944_single_conversion(struct ad7944_adc *adc,
 {
 	int ret;
 
-	ret = ad7944_convert_and_acquire(adc, chan);
+	ret = ad7944_convert_and_acquire(adc);
 	if (ret)
 		return ret;
 
@@ -361,7 +359,7 @@ static irqreturn_t ad7944_trigger_handler(int irq, void *p)
 	struct ad7944_adc *adc = iio_priv(indio_dev);
 	int ret;
 
-	ret = ad7944_convert_and_acquire(adc, &indio_dev->channels[0]);
+	ret = ad7944_convert_and_acquire(adc);
 	if (ret)
 		goto out;
 

---
base-commit: 6c46802cc0c4ff878f07139f7b7b8774fd43ce3d
change-id: 20240524-iio-ad7944-remove-unused-parameter-d814bb7e1a28

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: adc: ad7944: remove unused parameter
  2024-05-24 20:38 [PATCH] iio: adc: ad7944: remove unused parameter David Lechner
@ 2024-05-25 17:30 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2024-05-25 17:30 UTC (permalink / raw)
  To: David Lechner; +Cc: Michael Hennerich, Nuno Sá, linux-iio, linux-kernel

On Fri, 24 May 2024 15:38:04 -0500
David Lechner <dlechner@baylibre.com> wrote:

> In the ad7944 driver, the ad7944_convert_and_acquire() had an unused
> `chan` parameter. This patch removes the parameter.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Applied
> ---
>  drivers/iio/adc/ad7944.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7944.c b/drivers/iio/adc/ad7944.c
> index 4602ab5ed2a6..e2cb64cef476 100644
> --- a/drivers/iio/adc/ad7944.c
> +++ b/drivers/iio/adc/ad7944.c
> @@ -259,7 +259,6 @@ static int ad7944_chain_mode_init_msg(struct device *dev, struct ad7944_adc *adc
>  /**
>   * ad7944_convert_and_acquire - Perform a single conversion and acquisition
>   * @adc: The ADC device structure
> - * @chan: The channel specification
>   * Return: 0 on success, a negative error code on failure
>   *
>   * Perform a conversion and acquisition of a single sample using the
> @@ -268,8 +267,7 @@ static int ad7944_chain_mode_init_msg(struct device *dev, struct ad7944_adc *adc
>   * Upon successful return adc->sample.raw will contain the conversion result
>   * (or adc->chain_mode_buf if the device is using chain mode).
>   */
> -static int ad7944_convert_and_acquire(struct ad7944_adc *adc,
> -				      const struct iio_chan_spec *chan)
> +static int ad7944_convert_and_acquire(struct ad7944_adc *adc)
>  {
>  	int ret;
>  
> @@ -291,7 +289,7 @@ static int ad7944_single_conversion(struct ad7944_adc *adc,
>  {
>  	int ret;
>  
> -	ret = ad7944_convert_and_acquire(adc, chan);
> +	ret = ad7944_convert_and_acquire(adc);
>  	if (ret)
>  		return ret;
>  
> @@ -361,7 +359,7 @@ static irqreturn_t ad7944_trigger_handler(int irq, void *p)
>  	struct ad7944_adc *adc = iio_priv(indio_dev);
>  	int ret;
>  
> -	ret = ad7944_convert_and_acquire(adc, &indio_dev->channels[0]);
> +	ret = ad7944_convert_and_acquire(adc);
>  	if (ret)
>  		goto out;
>  
> 
> ---
> base-commit: 6c46802cc0c4ff878f07139f7b7b8774fd43ce3d
> change-id: 20240524-iio-ad7944-remove-unused-parameter-d814bb7e1a28


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-25 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 20:38 [PATCH] iio: adc: ad7944: remove unused parameter David Lechner
2024-05-25 17:30 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox