diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-02-09 03:22:13 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-09 03:22:13 -0500 |
commit | bbafbecb24190959d77a8fee7bd23798b81e25c2 (patch) | |
tree | cb910850195d628ee8c0ff77c2a534827cb268fa /drivers/acpi/sbshc.c | |
parent | b1d0e4f535e10775cffde922208b49629169aeaa (diff) | |
download | op-kernel-dev-bbafbecb24190959d77a8fee7bd23798b81e25c2.zip op-kernel-dev-bbafbecb24190959d77a8fee7bd23798b81e25c2.tar.gz |
ACPI: SBS: Host controller must initialize before SBS.
In static case sbshc must be compiled ahead of sbs, so that
hc is configured first.
http://bugzilla.kernel.org/show_bug.cgi?id=9910
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sbshc.c')
-rw-r--r-- | drivers/acpi/sbshc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index ae9a904..a2cf300 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -117,6 +117,11 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, int ret = -EFAULT, i; u8 temp, sz = 0; + if (!hc) { + printk(KERN_ERR PREFIX "host controller is not configured\n"); + return ret; + } + mutex_lock(&hc->lock); if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp)) goto end; @@ -292,6 +297,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type) hc = acpi_driver_data(device); acpi_ec_remove_query_handler(hc->ec, hc->query_bit); kfree(hc); + acpi_driver_data(device) = NULL; return 0; } |