summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2011-05-19 13:25:27 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2011-05-19 13:25:27 +1000
commitaaa2b6d75633f130e5be50dd5c391231f100dec6 (patch)
tree9b457ed0c1fdeef299505bf4ec70cb218c4ce5d1
parent2547f85480466756ca3593125da5322d55663777 (diff)
Revert "i2c-i801: Don't depend on other kernel driver config options"
This reverts commit fc02951b3293ae4806d375369bbc06892c702550.
-rw-r--r--drivers/i2c/busses/i2c-i801.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index ab26840d0c70..1aa5be019cfc 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -638,7 +638,7 @@ static const struct pci_device_id i801_ids[] = {
MODULE_DEVICE_TABLE(pci, i801_ids);
-#if defined CONFIG_X86 && defined CONFIG_DMI
+#if defined CONFIG_INPUT_APANEL || defined CONFIG_INPUT_APANEL_MODULE
static unsigned char apanel_addr;
/* Scan the system ROM for the signature "FJKEYINF" */
@@ -668,7 +668,11 @@ static void __init input_apanel_init(void)
}
iounmap(bios);
}
+#else
+static void __init input_apanel_init(void) {}
+#endif
+#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
struct dmi_onboard_device_info {
const char *name;
u8 type;
@@ -734,6 +738,7 @@ static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm,
dmi_check_onboard_device(type, name, adap);
}
}
+#endif
/* Register optional slaves */
static void __devinit i801_probe_optional_slaves(struct i801_priv *priv)
@@ -742,6 +747,7 @@ static void __devinit i801_probe_optional_slaves(struct i801_priv *priv)
if (priv->features & FEATURE_IDF)
return;
+#if defined CONFIG_INPUT_APANEL || defined CONFIG_INPUT_APANEL_MODULE
if (apanel_addr) {
struct i2c_board_info info;
@@ -750,14 +756,12 @@ static void __devinit i801_probe_optional_slaves(struct i801_priv *priv)
strlcpy(info.type, "fujitsu_apanel", I2C_NAME_SIZE);
i2c_new_device(&priv->adapter, &info);
}
-
+#endif
+#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
if (dmi_name_in_vendors("FUJITSU"))
dmi_walk(dmi_check_onboard_devices, &priv->adapter);
+#endif
}
-#else
-static void __init input_apanel_init(void) {}
-static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {}
-#endif /* CONFIG_X86 && CONFIG_DMI */
static int __devinit i801_probe(struct pci_dev *dev,
const struct pci_device_id *id)