summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-09-27 10:10:36 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-09-28 13:27:00 +0300
commit0580422560e2b93fe2e343d8438823824729a574 (patch)
treef252254b0867ed81425e1776de5487313da15b43
parent9e6b44d43e31160bfba568244c785f439ac33d0e (diff)
platform/x86/siemens: simatic-ipc-batt: Simplify simatic_ipc_batt_remove()
Instead of unconditionally returning zero, let simatic_ipc_batt_remove() return no value. This is a preparation to convert the drivers using this function to struct platform_driver::remove_new(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230927081040.2198742-24-u.kleine-koenig@pengutronix.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-rw-r--r--drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c4
-rw-r--r--drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c4
-rw-r--r--drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c4
-rw-r--r--drivers/platform/x86/siemens/simatic-ipc-batt.c7
-rw-r--r--drivers/platform/x86/siemens/simatic-ipc-batt.h4
5 files changed, 15 insertions, 8 deletions
diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c
index 8a67979d8f96..3e22a6bc9118 100644
--- a/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c
+++ b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c
@@ -27,7 +27,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_127e = {
static int simatic_ipc_batt_apollolake_remove(struct platform_device *pdev)
{
- return simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_127e);
+ simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_127e);
+
+ return 0;
}
static int simatic_ipc_batt_apollolake_probe(struct platform_device *pdev)
diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c
index 607d033911a2..9e08c659f27d 100644
--- a/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c
+++ b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c
@@ -27,7 +27,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_bx_21a = {
static int simatic_ipc_batt_elkhartlake_remove(struct platform_device *pdev)
{
- return simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_bx_21a);
+ simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_bx_21a);
+
+ return 0;
}
static int simatic_ipc_batt_elkhartlake_probe(struct platform_device *pdev)
diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c
index a66107e0fe1e..19c302a68911 100644
--- a/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c
+++ b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c
@@ -47,7 +47,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_bx_59a = {
static int simatic_ipc_batt_f7188x_remove(struct platform_device *pdev)
{
- return simatic_ipc_batt_remove(pdev, batt_lookup_table);
+ simatic_ipc_batt_remove(pdev, batt_lookup_table);
+
+ return 0;
}
static int simatic_ipc_batt_f7188x_probe(struct platform_device *pdev)
diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.c b/drivers/platform/x86/siemens/simatic-ipc-batt.c
index ef28c806b383..07cd4944de32 100644
--- a/drivers/platform/x86/siemens/simatic-ipc-batt.c
+++ b/drivers/platform/x86/siemens/simatic-ipc-batt.c
@@ -146,10 +146,9 @@ static const struct hwmon_chip_info simatic_ipc_batt_chip_info = {
.info = simatic_ipc_batt_info,
};
-int simatic_ipc_batt_remove(struct platform_device *pdev, struct gpiod_lookup_table *table)
+void simatic_ipc_batt_remove(struct platform_device *pdev, struct gpiod_lookup_table *table)
{
gpiod_remove_lookup_table(table);
- return 0;
}
EXPORT_SYMBOL_GPL(simatic_ipc_batt_remove);
@@ -230,7 +229,9 @@ EXPORT_SYMBOL_GPL(simatic_ipc_batt_probe);
static int simatic_ipc_batt_io_remove(struct platform_device *pdev)
{
- return simatic_ipc_batt_remove(pdev, NULL);
+ simatic_ipc_batt_remove(pdev, NULL);
+
+ return 0;
}
static int simatic_ipc_batt_io_probe(struct platform_device *pdev)
diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.h b/drivers/platform/x86/siemens/simatic-ipc-batt.h
index 4545cd3e3026..89891db26a2c 100644
--- a/drivers/platform/x86/siemens/simatic-ipc-batt.h
+++ b/drivers/platform/x86/siemens/simatic-ipc-batt.h
@@ -14,7 +14,7 @@
int simatic_ipc_batt_probe(struct platform_device *pdev,
struct gpiod_lookup_table *table);
-int simatic_ipc_batt_remove(struct platform_device *pdev,
- struct gpiod_lookup_table *table);
+void simatic_ipc_batt_remove(struct platform_device *pdev,
+ struct gpiod_lookup_table *table);
#endif /* _SIMATIC_IPC_BATT_H */