Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 031f2dcd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents a98fdcef 5cd6e675
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ static int xfer_write(struct i2c_adapter *adap, unsigned char *buf, int length)
 * Generic i2c master transfer entrypoint.
 * Generic i2c master transfer entrypoint.
 *
 *
 * Note: We do not use Atmel's feature of storing the "internal device address".
 * 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.
 * i2c message.
 * http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-September/024411.html
 * http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-September/024411.html
 */
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -619,13 +619,13 @@ omap_i2c_probe(struct platform_device *pdev)
err_free_irq:
err_free_irq:
	free_irq(dev->irq, dev);
	free_irq(dev->irq, dev);
err_unuse_clocks:
err_unuse_clocks:
	omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
	omap_i2c_disable_clocks(dev);
	omap_i2c_disable_clocks(dev);
	omap_i2c_put_clocks(dev);
	omap_i2c_put_clocks(dev);
err_free_mem:
err_free_mem:
	platform_set_drvdata(pdev, NULL);
	platform_set_drvdata(pdev, NULL);
	kfree(dev);
	kfree(dev);
err_release_region:
err_release_region:
	omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
	release_mem_region(mem->start, (mem->end - mem->start) + 1);
	release_mem_region(mem->start, (mem->end - mem->start) + 1);


	return r;
	return r;
+1 −1
Original line number Original line Diff line number Diff line
@@ -94,7 +94,7 @@ static s32 i2c_powermac_smbus_xfer( struct i2c_adapter* adap,
	    	break;
	    	break;


	/* Note that these are broken vs. the expected smbus API where
	/* 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
	 * 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
	 * any driver that I haven't verified for correctness to go
	 * anywhere near a pmac i2c bus anyway ...
	 * anywhere near a pmac i2c bus anyway ...
+5 −2
Original line number Original line Diff line number Diff line
@@ -200,11 +200,14 @@ static struct i2c_adapter sibyte_board_adapter[2] = {


static int __init i2c_sibyte_init(void)
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)
	if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0)
		return -ENODEV;
		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 -ENODEV;
	}
	return 0;
	return 0;
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -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
/* This address checking function differs from the one in i2c-core
   in that it considers an address with a registered device, but no
   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)
static int i2cdev_check_addr(struct i2c_adapter *adapter, unsigned int addr)
{
{
	struct list_head *item;
	struct list_head *item;
Loading