summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-09-13 13:14:31 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-30 19:46:12 +0200
commita194aa43272d22f035e6f862db2d714658a02b36 (patch)
treed8ce42c0ccdd075ea4ec230e7b9cffefbcc7aa23
parent2fb037b89a3125627f02c40af3e3d38c3228184b (diff)
downloadtalos-op-linux-a194aa43272d22f035e6f862db2d714658a02b36.tar.gz
talos-op-linux-a194aa43272d22f035e6f862db2d714658a02b36.zip
ACPI / IPMI: Cleanup some initialization codes
This (trivial) patch. 1. Changes dynamic mutex initialization to static initialization. 2. Removes one acpi_ipmi_init() variable initialization as it is not needed. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpi_ipmi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c
index 90d57c86db85..f7b6598bd7c2 100644
--- a/drivers/acpi/acpi_ipmi.c
+++ b/drivers/acpi/acpi_ipmi.c
@@ -127,6 +127,7 @@ static struct ipmi_driver_data driver_data = {
.ipmi_hndlrs = {
.ipmi_recv_hndl = ipmi_msg_handler,
},
+ .ipmi_lock = __MUTEX_INITIALIZER(driver_data.ipmi_lock)
};
static struct acpi_ipmi_device *
@@ -591,13 +592,11 @@ out_msg:
static int __init acpi_ipmi_init(void)
{
- int result = 0;
+ int result;
acpi_status status;
if (acpi_disabled)
- return result;
-
- mutex_init(&driver_data.ipmi_lock);
+ return 0;
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_IPMI, &acpi_ipmi_space_handler,
OpenPOWER on IntegriCloud