mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
platform/chrome: cros_ec: Make cros_ec_unregister() return void
Up to now cros_ec_unregister() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c, platform and spi remove callbacks is ignored anyway. Reviewed-by: Guenter Roeck <groeck@chromium.org> Link: https://lore.kernel.org/r/20211020071753.wltjslmimb6wtlp5@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
316f569df7
commit
afb0a80e63
5 changed files with 11 additions and 7 deletions
|
@ -302,13 +302,11 @@ EXPORT_SYMBOL(cros_ec_register);
|
|||
*
|
||||
* Return: 0 on success or negative error code.
|
||||
*/
|
||||
int cros_ec_unregister(struct cros_ec_device *ec_dev)
|
||||
void cros_ec_unregister(struct cros_ec_device *ec_dev)
|
||||
{
|
||||
if (ec_dev->pd)
|
||||
platform_device_unregister(ec_dev->pd);
|
||||
platform_device_unregister(ec_dev->ec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cros_ec_unregister);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
|
||||
int cros_ec_register(struct cros_ec_device *ec_dev);
|
||||
int cros_ec_unregister(struct cros_ec_device *ec_dev);
|
||||
void cros_ec_unregister(struct cros_ec_device *ec_dev);
|
||||
|
||||
int cros_ec_suspend(struct cros_ec_device *ec_dev);
|
||||
int cros_ec_resume(struct cros_ec_device *ec_dev);
|
||||
|
|
|
@ -313,7 +313,9 @@ static int cros_ec_i2c_remove(struct i2c_client *client)
|
|||
{
|
||||
struct cros_ec_device *ec_dev = i2c_get_clientdata(client);
|
||||
|
||||
return cros_ec_unregister(ec_dev);
|
||||
cros_ec_unregister(ec_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
|
@ -439,7 +439,9 @@ static int cros_ec_lpc_remove(struct platform_device *pdev)
|
|||
acpi_remove_notify_handler(adev->handle, ACPI_ALL_NOTIFY,
|
||||
cros_ec_lpc_acpi_notify);
|
||||
|
||||
return cros_ec_unregister(ec_dev);
|
||||
cros_ec_unregister(ec_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct acpi_device_id cros_ec_lpc_acpi_device_ids[] = {
|
||||
|
|
|
@ -790,7 +790,9 @@ static int cros_ec_spi_remove(struct spi_device *spi)
|
|||
{
|
||||
struct cros_ec_device *ec_dev = spi_get_drvdata(spi);
|
||||
|
||||
return cros_ec_unregister(ec_dev);
|
||||
cros_ec_unregister(ec_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
Loading…
Add table
Reference in a new issue