Commit fde046a8 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

pps: clients: gpio: Remove redundant condition in ->remove()

The timer along with GPIO API are NULL-aware, there is no need to test
against existing GPIO echo line.
Acked-by: default avatarRodolfo Giometti <giometti@enneenne.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210318130321.24227-3-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a8fc4f7
...@@ -240,11 +240,9 @@ static int pps_gpio_remove(struct platform_device *pdev) ...@@ -240,11 +240,9 @@ static int pps_gpio_remove(struct platform_device *pdev)
struct pps_gpio_device_data *data = platform_get_drvdata(pdev); struct pps_gpio_device_data *data = platform_get_drvdata(pdev);
pps_unregister_source(data->pps); pps_unregister_source(data->pps);
if (data->echo_pin) { del_timer_sync(&data->echo_timer);
del_timer_sync(&data->echo_timer); /* reset echo pin in any case */
/* reset echo pin in any case */ gpiod_set_value(data->echo_pin, 0);
gpiod_set_value(data->echo_pin, 0);
}
dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq); dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment