Commit 9888feb9 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih

platform/chrome: cros_ec_lpc_mec: remove cros_ec_lpc_mec_destroy()

It's pointless (and invalid) to destroy a statically allocated mutex in
cros_ec_lpc_mec_destroy().

Let's remove it.
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20221031050657.3899359-1-tzungbi@kernel.org
parent e068bc0b
...@@ -593,7 +593,6 @@ static int __init cros_ec_lpc_init(void) ...@@ -593,7 +593,6 @@ static int __init cros_ec_lpc_init(void)
ret = platform_driver_register(&cros_ec_lpc_driver); ret = platform_driver_register(&cros_ec_lpc_driver);
if (ret) { if (ret) {
pr_err(DRV_NAME ": can't register driver: %d\n", ret); pr_err(DRV_NAME ": can't register driver: %d\n", ret);
cros_ec_lpc_mec_destroy();
return ret; return ret;
} }
...@@ -603,7 +602,6 @@ static int __init cros_ec_lpc_init(void) ...@@ -603,7 +602,6 @@ static int __init cros_ec_lpc_init(void)
if (ret) { if (ret) {
pr_err(DRV_NAME ": can't register device: %d\n", ret); pr_err(DRV_NAME ": can't register device: %d\n", ret);
platform_driver_unregister(&cros_ec_lpc_driver); platform_driver_unregister(&cros_ec_lpc_driver);
cros_ec_lpc_mec_destroy();
} }
} }
...@@ -615,7 +613,6 @@ static void __exit cros_ec_lpc_exit(void) ...@@ -615,7 +613,6 @@ static void __exit cros_ec_lpc_exit(void)
if (!cros_ec_lpc_acpi_device_found) if (!cros_ec_lpc_acpi_device_found)
platform_device_unregister(&cros_ec_lpc_device); platform_device_unregister(&cros_ec_lpc_device);
platform_driver_unregister(&cros_ec_lpc_driver); platform_driver_unregister(&cros_ec_lpc_driver);
cros_ec_lpc_mec_destroy();
} }
module_init(cros_ec_lpc_init); module_init(cros_ec_lpc_init);
......
...@@ -146,9 +146,3 @@ void cros_ec_lpc_mec_init(unsigned int base, unsigned int end) ...@@ -146,9 +146,3 @@ void cros_ec_lpc_mec_init(unsigned int base, unsigned int end)
mec_emi_end = end; mec_emi_end = end;
} }
EXPORT_SYMBOL(cros_ec_lpc_mec_init); EXPORT_SYMBOL(cros_ec_lpc_mec_init);
void cros_ec_lpc_mec_destroy(void)
{
mutex_destroy(&io_mutex);
}
EXPORT_SYMBOL(cros_ec_lpc_mec_destroy);
...@@ -45,13 +45,6 @@ enum cros_ec_lpc_mec_io_type { ...@@ -45,13 +45,6 @@ enum cros_ec_lpc_mec_io_type {
*/ */
void cros_ec_lpc_mec_init(unsigned int base, unsigned int end); void cros_ec_lpc_mec_init(unsigned int base, unsigned int end);
/*
* cros_ec_lpc_mec_destroy
*
* Cleanup MEC I/O.
*/
void cros_ec_lpc_mec_destroy(void);
/** /**
* cros_ec_lpc_mec_in_range() - Determine if addresses are in MEC EMI range. * cros_ec_lpc_mec_in_range() - Determine if addresses are in MEC EMI range.
* *
......
...@@ -129,7 +129,6 @@ static int wilco_ec_probe(struct platform_device *pdev) ...@@ -129,7 +129,6 @@ static int wilco_ec_probe(struct platform_device *pdev)
unregister_debugfs: unregister_debugfs:
if (ec->debugfs_pdev) if (ec->debugfs_pdev)
platform_device_unregister(ec->debugfs_pdev); platform_device_unregister(ec->debugfs_pdev);
cros_ec_lpc_mec_destroy();
return ret; return ret;
} }
...@@ -143,10 +142,6 @@ static int wilco_ec_remove(struct platform_device *pdev) ...@@ -143,10 +142,6 @@ static int wilco_ec_remove(struct platform_device *pdev)
platform_device_unregister(ec->rtc_pdev); platform_device_unregister(ec->rtc_pdev);
if (ec->debugfs_pdev) if (ec->debugfs_pdev)
platform_device_unregister(ec->debugfs_pdev); platform_device_unregister(ec->debugfs_pdev);
/* Teardown cros_ec interface */
cros_ec_lpc_mec_destroy();
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