aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-14 16:23:20 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-14 16:23:20 -0500
commit031f2dcd7075e218e74dd7f942ad015cf82dffab (patch)
treed7ee06c0fcfb2e841230e38de704dd0fed60bd7e
parenta98fdcef941e107eeabae622d85a1f476f25a160 (diff)
parent5cd6e675f862568ad73c061665ee5080cfd952c5 (diff)
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-sibyte: Fix an error path i2c: Driver IDs are optional i2c: Spelling fixes i2c-omap: Fix NULL pointer dereferencing
-rw-r--r--drivers/i2c/busses/i2c-at91.c2
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
-rw-r--r--drivers/i2c/busses/i2c-powermac.c2
-rw-r--r--drivers/i2c/busses/i2c-sibyte.c7
-rw-r--r--drivers/i2c/i2c-dev.c2
-rw-r--r--include/linux/i2c-id.h4
6 files changed, 13 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 9c8b6d5eaec9..c09b036913bd 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -135,7 +135,7 @@ static int xfer_write(struct i2c_adapter *adap, unsigned char *buf, int length)
135 * Generic i2c master transfer entrypoint. 135 * Generic i2c master transfer entrypoint.
136 * 136 *
137 * Note: We do not use Atmel's feature of storing the "internal device address". 137 * Note: We do not use Atmel's feature of storing the "internal device address".
138 * Instead the "internal device address" has to be written using a seperate 138 * Instead the "internal device address" has to be written using a separate
139 * i2c message. 139 * i2c message.
140 * http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-September/024411.html 140 * http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-September/024411.html
141 */ 141 */
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index cb55cf2ba1e9..f2552b19ea60 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -619,13 +619,13 @@ omap_i2c_probe(struct platform_device *pdev)
619err_free_irq: 619err_free_irq:
620 free_irq(dev->irq, dev); 620 free_irq(dev->irq, dev);
621err_unuse_clocks: 621err_unuse_clocks:
622 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
622 omap_i2c_disable_clocks(dev); 623 omap_i2c_disable_clocks(dev);
623 omap_i2c_put_clocks(dev); 624 omap_i2c_put_clocks(dev);
624err_free_mem: 625err_free_mem:
625 platform_set_drvdata(pdev, NULL); 626 platform_set_drvdata(pdev, NULL);
626 kfree(dev); 627 kfree(dev);
627err_release_region: 628err_release_region:
628 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
629 release_mem_region(mem->start, (mem->end - mem->start) + 1); 629 release_mem_region(mem->start, (mem->end - mem->start) + 1);
630 630
631 return r; 631 return r;
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index 0ab4f2627c26..7813127649a1 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -94,7 +94,7 @@ static s32 i2c_powermac_smbus_xfer( struct i2c_adapter* adap,
94 break; 94 break;
95 95
96 /* Note that these are broken vs. the expected smbus API where 96 /* Note that these are broken vs. the expected smbus API where
97 * on reads, the lenght is actually returned from the function, 97 * on reads, the length is actually returned from the function,
98 * but I think the current API makes no sense and I don't want 98 * but I think the current API makes no sense and I don't want
99 * any driver that I haven't verified for correctness to go 99 * any driver that I haven't verified for correctness to go
100 * anywhere near a pmac i2c bus anyway ... 100 * anywhere near a pmac i2c bus anyway ...
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c
index 0ca599d3b402..503a134ec803 100644
--- a/drivers/i2c/busses/i2c-sibyte.c
+++ b/drivers/i2c/busses/i2c-sibyte.c
@@ -200,11 +200,14 @@ static struct i2c_adapter sibyte_board_adapter[2] = {
200 200
201static int __init i2c_sibyte_init(void) 201static int __init i2c_sibyte_init(void)
202{ 202{
203 printk("i2c-swarm.o: i2c SMBus adapter module for SiByte board\n"); 203 pr_info("i2c-sibyte: i2c SMBus adapter module for SiByte board\n");
204 if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0) 204 if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0)
205 return -ENODEV; 205 return -ENODEV;
206 if (i2c_sibyte_add_bus(&sibyte_board_adapter[1], K_SMB_FREQ_400KHZ) < 0) 206 if (i2c_sibyte_add_bus(&sibyte_board_adapter[1],
207 K_SMB_FREQ_400KHZ) < 0) {
208 i2c_del_adapter(&sibyte_board_adapter[0]);
207 return -ENODEV; 209 return -ENODEV;
210 }
208 return 0; 211 return 0;
209} 212}
210 213
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index c21ae20ae362..df540d5dfaf4 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -184,7 +184,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
184 184
185/* This address checking function differs from the one in i2c-core 185/* This address checking function differs from the one in i2c-core
186 in that it considers an address with a registered device, but no 186 in that it considers an address with a registered device, but no
187 bounded driver, as NOT busy. */ 187 bound driver, as NOT busy. */
188static int i2cdev_check_addr(struct i2c_adapter *adapter, unsigned int addr) 188static int i2cdev_check_addr(struct i2c_adapter *adapter, unsigned int addr)
189{ 189{
190 struct list_head *item; 190 struct list_head *item;
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 88c81403eb3f..e18017d45758 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -23,6 +23,10 @@
23#ifndef LINUX_I2C_ID_H 23#ifndef LINUX_I2C_ID_H
24#define LINUX_I2C_ID_H 24#define LINUX_I2C_ID_H
25 25
26/* Please note that I2C driver IDs are optional. They are only needed if a
27 legacy chip driver needs to identify a bus or a bus driver needs to
28 identify a legacy client. If you don't need them, just don't set them. */
29
26/* 30/*
27 * ---- Driver types ----------------------------------------------------- 31 * ---- Driver types -----------------------------------------------------
28 */ 32 */