diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 13:28:19 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 13:28:19 -0200 |
commit | 734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542 (patch) | |
tree | c4805dd7e746b1feb9e09e9849f3245d0b2c0c6b /drivers/i2c/busses/i2c-i801.c | |
parent | 216c82c6aba63eeb49d7654b448e0d47bea255bb (diff) | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
Merge tag 'v3.8-rc3' into v4l_for_linus
Linux 3.8-rc3
* tag 'v3.8-rc3': (11110 commits)
Linux 3.8-rc3
mm: reinstante dropped pmd_trans_splitting() check
cred: Remove tgcred pointer from struct cred
drm/ttm: fix fence locking in ttm_buffer_object_transfer
ARM: clps711x: Fix bad merge of clockevents setup
ARM: highbank: save and restore L2 cache and GIC on suspend
ARM: highbank: add a power request clear
ARM: highbank: fix secondary boot and hotplug
ARM: highbank: fix typos with hignbank in power request functions
ARM: dts: fix highbank cpu mpidr values
ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
drm/prime: drop reference on imported dma-buf come from gem
xen/netfront: improve truesize tracking
ARM: mx5: Fix MX53 flexcan2 clock
ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
sctp: fix Kconfig bug in default cookie hmac selection
EDAC: Cleanup device deregistering path
EDAC: Fix EDAC Kconfig menu
EDAC: Fix kernel panic on module unloading
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
...
Diffstat (limited to 'drivers/i2c/busses/i2c-i801.c')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 6abc00d5988..3092387f6ef 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -81,6 +81,7 @@ #include <linux/slab.h> #include <linux/wait.h> #include <linux/err.h> +#include <linux/of_i2c.h> #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ defined CONFIG_DMI @@ -840,14 +841,14 @@ struct dmi_onboard_device_info { const char *i2c_type; }; -static struct dmi_onboard_device_info __devinitdata dmi_devices[] = { +static const struct dmi_onboard_device_info dmi_devices[] = { { "Syleus", DMI_DEV_TYPE_OTHER, 0x73, "fscsyl" }, { "Hermes", DMI_DEV_TYPE_OTHER, 0x73, "fscher" }, { "Hades", DMI_DEV_TYPE_OTHER, 0x73, "fschds" }, }; -static void __devinit dmi_check_onboard_device(u8 type, const char *name, - struct i2c_adapter *adap) +static void dmi_check_onboard_device(u8 type, const char *name, + struct i2c_adapter *adap) { int i; struct i2c_board_info info; @@ -870,8 +871,7 @@ static void __devinit dmi_check_onboard_device(u8 type, const char *name, /* We use our own function to check for onboard devices instead of dmi_find_device() as some buggy BIOS's have the devices we are interested in marked as disabled */ -static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm, - void *adap) +static void dmi_check_onboard_devices(const struct dmi_header *dm, void *adap) { int i, count; @@ -900,7 +900,7 @@ static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm, } /* Register optional slaves */ -static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) +static void i801_probe_optional_slaves(struct i801_priv *priv) { /* Only register slaves on main SMBus channel */ if (priv->features & FEATURE_IDF) @@ -920,7 +920,7 @@ static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) } #else static void __init input_apanel_init(void) {} -static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {} +static void i801_probe_optional_slaves(struct i801_priv *priv) {} #endif /* CONFIG_X86 && CONFIG_DMI */ #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ @@ -943,7 +943,7 @@ static struct i801_mux_config i801_mux_config_asus_z8_d18 = { .n_gpios = 2, }; -static struct dmi_system_id __devinitdata mux_dmi_table[] = { +static const struct dmi_system_id mux_dmi_table[] = { { .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), @@ -1011,7 +1011,7 @@ static struct dmi_system_id __devinitdata mux_dmi_table[] = { }; /* Setup multiplexing if needed */ -static int __devinit i801_add_mux(struct i801_priv *priv) +static int i801_add_mux(struct i801_priv *priv) { struct device *dev = &priv->adapter.dev; const struct i801_mux_config *mux_config; @@ -1047,13 +1047,13 @@ static int __devinit i801_add_mux(struct i801_priv *priv) return 0; } -static void __devexit i801_del_mux(struct i801_priv *priv) +static void i801_del_mux(struct i801_priv *priv) { if (priv->mux_pdev) platform_device_unregister(priv->mux_pdev); } -static unsigned int __devinit i801_get_adapter_class(struct i801_priv *priv) +static unsigned int i801_get_adapter_class(struct i801_priv *priv) { const struct dmi_system_id *id; const struct i801_mux_config *mux_config; @@ -1083,8 +1083,7 @@ static inline unsigned int i801_get_adapter_class(struct i801_priv *priv) } #endif -static int __devinit i801_probe(struct pci_dev *dev, - const struct pci_device_id *id) +static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) { unsigned char temp; int err, i; @@ -1108,6 +1107,7 @@ static int __devinit i801_probe(struct pci_dev *dev, /* fall through */ default: priv->features |= FEATURE_I2C_BLOCK_READ; + priv->features |= FEATURE_IRQ; /* fall through */ case PCI_DEVICE_ID_INTEL_82801DB_3: priv->features |= FEATURE_SMBUS_PEC; @@ -1120,16 +1120,6 @@ static int __devinit i801_probe(struct pci_dev *dev, break; } - /* IRQ processing tested on CougarPoint PCH, ICH5, ICH7-M and ICH10 */ - if (dev->device == PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS || - dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 || - dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 || - dev->device == PCI_DEVICE_ID_INTEL_ICH8_5 || - dev->device == PCI_DEVICE_ID_INTEL_ICH9_6 || - dev->device == PCI_DEVICE_ID_INTEL_ICH10_4 || - dev->device == PCI_DEVICE_ID_INTEL_ICH10_5) - priv->features |= FEATURE_IRQ; - /* Disable features on user request */ for (i = 0; i < ARRAY_SIZE(i801_feature_names); i++) { if (priv->features & disable_features & (1 << i)) @@ -1215,6 +1205,7 @@ static int __devinit i801_probe(struct pci_dev *dev, goto exit_free_irq; } + of_i2c_register_devices(&priv->adapter); i801_probe_optional_slaves(priv); /* We ignore errors - multiplexing is optional */ i801_add_mux(priv); @@ -1233,7 +1224,7 @@ exit: return err; } -static void __devexit i801_remove(struct pci_dev *dev) +static void i801_remove(struct pci_dev *dev) { struct i801_priv *priv = pci_get_drvdata(dev); @@ -1279,7 +1270,7 @@ static struct pci_driver i801_driver = { .name = "i801_smbus", .id_table = i801_ids, .probe = i801_probe, - .remove = __devexit_p(i801_remove), + .remove = i801_remove, .suspend = i801_suspend, .resume = i801_resume, }; |