mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Ryan Govostes <rgovostes@whoi.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH resend v1 3/7] pps: clients: gpio: Remove redundant condition in ->remove()
Date: Tue, 9 Mar 2021 13:25:34 +0100	[thread overview]
Message-ID: <14d42964-3d70-070f-2481-263745c50f7b@enneenne.com> (raw)
In-Reply-To: <20210309112403.36633-3-andriy.shevchenko@linux.intel.com>

On 09/03/21 12:23, Andy Shevchenko wrote:
> The timer along with GPIO API are NULL-aware, there is no need to test
> against existing GPIO echo line.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/pps/clients/pps-gpio.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
> index 78c9680e8063..dc9ed6fc3dae 100644
> --- a/drivers/pps/clients/pps-gpio.c
> +++ b/drivers/pps/clients/pps-gpio.c
> @@ -240,11 +240,9 @@ static int pps_gpio_remove(struct platform_device *pdev)
>  	struct pps_gpio_device_data *data = platform_get_drvdata(pdev);
>  
>  	pps_unregister_source(data->pps);
> -	if (data->echo_pin) {
> -		del_timer_sync(&data->echo_timer);
> -		/* reset echo pin in any case */
> -		gpiod_set_value(data->echo_pin, 0);
> -	}
> +	del_timer_sync(&data->echo_timer);
> +	/* reset echo pin in any case */
> +	gpiod_set_value(data->echo_pin, 0);
>  	dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq);
>  	return 0;
>  }
> 

Acked-by: Rodolfo Giometti <giometti@enneenne.com>

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

  reply	other threads:[~2021-03-09 12:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 11:23 [PATCH resend v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line Andy Shevchenko
2021-03-09 11:23 ` [PATCH resend v1 2/7] pps: clients: gpio: Use dev_err_probe() to avoid log noise Andy Shevchenko
2021-03-09 12:25   ` Rodolfo Giometti
2021-03-09 11:23 ` [PATCH resend v1 3/7] pps: clients: gpio: Remove redundant condition in ->remove() Andy Shevchenko
2021-03-09 12:25   ` Rodolfo Giometti [this message]
2021-03-09 11:24 ` [PATCH resend v1 4/7] pps: clients: gpio: Get rid of legacy platform data Andy Shevchenko
2021-03-09 12:25   ` Rodolfo Giometti
2021-03-09 11:24 ` [PATCH resend v1 5/7] pps: clients: gpio: Make use of device properties Andy Shevchenko
2021-03-09 12:27   ` Rodolfo Giometti
2021-03-09 11:24 ` [PATCH resend v1 6/7] pps: clients: gpio: Use struct device pointer directly Andy Shevchenko
2021-03-09 12:30   ` Rodolfo Giometti
2021-03-09 11:24 ` [PATCH resend v1 7/7] pps: clients: gpio: Rearrange optional stuff in pps_gpio_setup() Andy Shevchenko
2021-03-09 12:30   ` Rodolfo Giometti
2021-03-09 12:23 ` [PATCH resend v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line Rodolfo Giometti
2021-03-15 12:34 ` Andy Shevchenko

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=14d42964-3d70-070f-2481-263745c50f7b@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgovostes@whoi.edu \
    /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

all inboxes | Powered by JetHome®