]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 14 Jan 2008 21:23:20 +0000 (13:23 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 14 Jan 2008 21:23:20 +0000 (13:23 -0800)
* '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

drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-powermac.c
drivers/i2c/busses/i2c-sibyte.c
drivers/i2c/i2c-dev.c
include/linux/i2c-id.h

index 9c8b6d5eaec9ef301fe1491d6bf8ce714bfc3c8c..c09b036913bd9588f9789f982b884b319cff5890 100644 (file)
@@ -135,7 +135,7 @@ static int xfer_write(struct i2c_adapter *adap, unsigned char *buf, int length)
  * Generic i2c master transfer entrypoint.
  *
  * Note: We do not use Atmel's feature of storing the "internal device address".
- * Instead the "internal device address" has to be written using a seperate
+ * Instead the "internal device address" has to be written using a separate
  * i2c message.
  * http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-September/024411.html
  */
index cb55cf2ba1e91a4279f3406f34216b4a59f4094e..f2552b19ea607d741082ca54aec28c4984b614f8 100644 (file)
@@ -619,13 +619,13 @@ omap_i2c_probe(struct platform_device *pdev)
 err_free_irq:
        free_irq(dev->irq, dev);
 err_unuse_clocks:
+       omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
        omap_i2c_disable_clocks(dev);
        omap_i2c_put_clocks(dev);
 err_free_mem:
        platform_set_drvdata(pdev, NULL);
        kfree(dev);
 err_release_region:
-       omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
        release_mem_region(mem->start, (mem->end - mem->start) + 1);
 
        return r;
index 0ab4f2627c26c58c3eb53fb593da0fffe7f03bff..7813127649a101e2977fa42544d7b2d6e50503e9 100644 (file)
@@ -94,7 +94,7 @@ static s32 i2c_powermac_smbus_xfer(   struct i2c_adapter*     adap,
                break;
 
        /* Note that these are broken vs. the expected smbus API where
-        * on reads, the lenght is actually returned from the function,
+        * on reads, the length is actually returned from the function,
         * but I think the current API makes no sense and I don't want
         * any driver that I haven't verified for correctness to go
         * anywhere near a pmac i2c bus anyway ...
index 0ca599d3b4029851ddf022bab424759824060ec2..503a134ec803c13edd0cd43dd71432179216f60a 100644 (file)
@@ -200,11 +200,14 @@ static struct i2c_adapter sibyte_board_adapter[2] = {
 
 static int __init i2c_sibyte_init(void)
 {
-       printk("i2c-swarm.o: i2c SMBus adapter module for SiByte board\n");
+       pr_info("i2c-sibyte: i2c SMBus adapter module for SiByte board\n");
        if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0)
                return -ENODEV;
-       if (i2c_sibyte_add_bus(&sibyte_board_adapter[1], K_SMB_FREQ_400KHZ) < 0)
+       if (i2c_sibyte_add_bus(&sibyte_board_adapter[1],
+                              K_SMB_FREQ_400KHZ) < 0) {
+               i2c_del_adapter(&sibyte_board_adapter[0]);
                return -ENODEV;
+       }
        return 0;
 }
 
index c21ae20ae362b059a2c347238f0e063616e0411e..df540d5dfaf42db7f249c30491c59679265353da 100644 (file)
@@ -184,7 +184,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
 
 /* This address checking function differs from the one in i2c-core
    in that it considers an address with a registered device, but no
-   bounded driver, as NOT busy. */
+   bound driver, as NOT busy. */
 static int i2cdev_check_addr(struct i2c_adapter *adapter, unsigned int addr)
 {
        struct list_head *item;
index 88c81403eb3ff8dbb4804e72c0fa65d28afe0691..e18017d457583d0ddbc3f4c7f9420df34a9cdff3 100644 (file)
 #ifndef LINUX_I2C_ID_H
 #define LINUX_I2C_ID_H
 
+/* Please note that I2C driver IDs are optional. They are only needed if a
+   legacy chip driver needs to identify a bus or a bus driver needs to
+   identify a legacy client. If you don't need them, just don't set them. */
+
 /*
  * ---- Driver types -----------------------------------------------------
  */