summaryrefslogtreecommitdiffstats
path: root/drivers/pps/clients/pps-gpio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-07 21:07:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-07 21:07:09 +0200
commitbd7246a19ed85451befc3c8fc6038a7d955e7d5f (patch)
tree8657f83df15e5315c4605f835ce10026d09a5b16 /drivers/pps/clients/pps-gpio.c
parentdriver core: device.h: Group of_node handling declarations and definitions (diff)
parentplatform: Make platform_driver::remove() return void (diff)
downloadlinux-bd7246a19ed85451befc3c8fc6038a7d955e7d5f.tar.xz
linux-bd7246a19ed85451befc3c8fc6038a7d955e7d5f.zip
Merge tag 'platform-remove-void-step-b' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux into driver-core-next
Uwe writes: Change struct platform_driver::remove() to return void This is step b) of the plan outlined in commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value"), which completes the first major step of making the remove callback return no value. Up to now it returned an int which however was mostly ignored by the driver core and lured driver authors to believe there is some error handling. Note that the Linux driver model assumes that removing a device cannot fail, so this isn't about being lazy and not implementing error handling in the core and so making .remove return void is the right thing to do. * tag 'platform-remove-void-step-b' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: platform: Make platform_driver::remove() return void samples: qmi: Convert to platform remove callback returning void nvdimm/of_pmem: Convert to platform remove callback returning void nvdimm/e820: Convert to platform remove callback returning void gpu: ipu-v3: Convert to platform remove callback returning void gpu: host1x: Convert to platform remove callback returning void drm/mediatek: Convert to platform remove callback returning void drm/imagination: Convert to platform remove callback returning void gpu: host1x: mipi: Benefit from devm_clk_get_prepared() pps: clients: gpio: Convert to platform remove callback returning void fsi: occ: Convert to platform remove callback returning void fsi: master-gpio: Convert to platform remove callback returning void fsi: master-ast-cf: Convert to platform remove callback returning void fsi: master-aspeed: Convert to platform remove callback returning void reset: ti-sci: Convert to platform remove callback returning void reset: rzg2l-usbphy-ctrl: Convert to platform remove callback returning void reset: meson-audio-arb: Convert to platform remove callback returning void
Diffstat (limited to 'drivers/pps/clients/pps-gpio.c')
-rw-r--r--drivers/pps/clients/pps-gpio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 2f4b11b4dfcd..791fdc9326dd 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -220,7 +220,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
return 0;
}
-static int pps_gpio_remove(struct platform_device *pdev)
+static void pps_gpio_remove(struct platform_device *pdev)
{
struct pps_gpio_device_data *data = platform_get_drvdata(pdev);
@@ -229,7 +229,6 @@ static int pps_gpio_remove(struct platform_device *pdev)
/* 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;
}
static const struct of_device_id pps_gpio_dt_ids[] = {
@@ -240,7 +239,7 @@ MODULE_DEVICE_TABLE(of, pps_gpio_dt_ids);
static struct platform_driver pps_gpio_driver = {
.probe = pps_gpio_probe,
- .remove = pps_gpio_remove,
+ .remove_new = pps_gpio_remove,
.driver = {
.name = PPS_GPIO_NAME,
.of_match_table = pps_gpio_dt_ids,