From 0b1082efb92eedb28e982cfae526267ebdcf5622 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 23 Nov 2006 13:28:50 +0100 Subject: [PATCH] Fix i2c-ixp4xx compile (missing brace) Fix recent i2c-ixp4xx compilation breakage. Sorry for overlooking it. Signed-off-by: Jean Delvare Signed-off-by: Linus Torvalds --- drivers/i2c/busses/i2c-ixp4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/i2c') diff --git a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c index 05fffb9415a..68fe863f9d5 100644 --- a/drivers/i2c/busses/i2c-ixp4xx.c +++ b/drivers/i2c/busses/i2c-ixp4xx.c @@ -138,7 +138,7 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev) gpio_line_set(gpio->sda_pin, 0); err = i2c_bit_add_bus(&drv_data->adapter); - if (err != 0) + if (err) { printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id); kfree(drv_data); -- cgit v1.2.3 From adbc2a102252994c36102008293b52760613d6c3 Mon Sep 17 00:00:00 2001 From: Jason Gaston Date: Wed, 22 Nov 2006 15:19:12 -0800 Subject: i2c-i801: SMBus patch for Intel ICH9 This updated patch adds the Intel ICH9 LPC and SMBus Controller DID's. Thi= s patch relies on the irq ICH9 patch to pci_ids.h. Signed-off-by: Jason Gaston Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'drivers/i2c') diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 510816c16da..04bee524e31 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -125,6 +125,7 @@ config I2C_I801 ICH7 ESB2 ICH8 + ICH9 This driver can also be built as a module. If so, the module will be called i2c-i801. diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index bbb2fbee836..c7be2fdbd86 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -33,6 +33,7 @@ ICH7 27DA ESB2 269B ICH8 283E + ICH9 2930 This driver supports several versions of Intel's I/O Controller Hubs (ICH). For SMBus support, they are similar to the PIIX4 and are part of Intel's '810' and other chipsets. @@ -457,6 +458,7 @@ static struct pci_device_id i801_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_6) }, { 0, } }; -- cgit v1.2.3 From ac11d0601bbe73c92e31b393eeb1225593788d4c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 3 Jul 2006 13:46:24 -0700 Subject: I2C: convert i2c-dev to use struct device instead of struct class_device As class_device is going away eventually... Cc: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/i2c-dev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/i2c') diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 3f869033ed7..94a4e9a3013 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -42,7 +42,7 @@ static struct i2c_driver i2cdev_driver; struct i2c_dev { struct list_head list; struct i2c_adapter *adap; - struct class_device *class_dev; + struct device *dev; }; #define I2C_MINORS 256 @@ -92,15 +92,16 @@ static void return_i2c_dev(struct i2c_dev *i2c_dev) spin_unlock(&i2c_dev_list_lock); } -static ssize_t show_adapter_name(struct class_device *class_dev, char *buf) +static ssize_t show_adapter_name(struct device *dev, + struct device_attribute *attr, char *buf) { - struct i2c_dev *i2c_dev = i2c_dev_get_by_minor(MINOR(class_dev->devt)); + struct i2c_dev *i2c_dev = i2c_dev_get_by_minor(MINOR(dev->devt)); if (!i2c_dev) return -ENODEV; return sprintf(buf, "%s\n", i2c_dev->adap->name); } -static CLASS_DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL); +static DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL); static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count, loff_t *offset) @@ -413,15 +414,14 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap) return PTR_ERR(i2c_dev); /* register this i2c device with the driver core */ - i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL, - MKDEV(I2C_MAJOR, adap->nr), - &adap->dev, "i2c-%d", - adap->nr); - if (!i2c_dev->class_dev) { + i2c_dev->dev = device_create(i2c_dev_class, &adap->dev, + MKDEV(I2C_MAJOR, adap->nr), + "i2c-%d", adap->nr); + if (!i2c_dev->dev) { res = -ENODEV; goto error; } - res = class_device_create_file(i2c_dev->class_dev, &class_device_attr_name); + res = device_create_file(i2c_dev->dev, &dev_attr_name); if (res) goto error_destroy; @@ -429,7 +429,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap) adap->name, adap->nr); return 0; error_destroy: - class_device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr)); + device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr)); error: return_i2c_dev(i2c_dev); kfree(i2c_dev); @@ -444,9 +444,9 @@ static int i2cdev_detach_adapter(struct i2c_adapter *adap) if (!i2c_dev) /* attach_adapter must have failed */ return 0; - class_device_remove_file(i2c_dev->class_dev, &class_device_attr_name); + device_remove_file(i2c_dev->dev, &dev_attr_name); return_i2c_dev(i2c_dev); - class_device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr)); + device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr)); kfree(i2c_dev); pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name); -- cgit v1.2.3