]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/i2c/busses/i2c-omap.c
Convert files to UTF-8 and some cleanups
[net-next-2.6.git] / drivers / i2c / busses / i2c-omap.c
index 81d87d2c2a2d6a177f3c2bbdb2dec083aa31e073..89a30028ddb6e40d9cd00402936460e196a32f9b 100644 (file)
@@ -8,7 +8,7 @@
  * Tony Lindgren <tony@atomide.com> and Imre Deak <imre.deak@nokia.com>
  * Copyright (C) 2005 Nokia Corporation
  *
- * Cleaned up by Juha Yrj <juha.yrjola@nokia.com>
+ * Cleaned up by Juha Yrjölä <juha.yrjola@nokia.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -231,8 +231,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
                 * 13           2               1
                 * 19.2         2               1
                 */
-               if (fclk_rate > 16000000)
-                       psc = (fclk_rate + 8000000) / 12000000;
+               if (fclk_rate > 12000000)
+                       psc = fclk_rate / 12000000;
        }
 
        /* Setup clock prescaler to obtain approx 12MHz I2C module clock: */
@@ -400,7 +400,7 @@ omap_i2c_ack_stat(struct omap_i2c_dev *dev, u16 stat)
 }
 
 static irqreturn_t
-omap_i2c_rev1_isr(int this_irq, void *dev_id, struct pt_regs *regs)
+omap_i2c_rev1_isr(int this_irq, void *dev_id)
 {
        struct omap_i2c_dev *dev = dev_id;
        u16 iv, w;
@@ -452,7 +452,7 @@ omap_i2c_rev1_isr(int this_irq, void *dev_id, struct pt_regs *regs)
 }
 
 static irqreturn_t
-omap_i2c_isr(int this_irq, void *dev_id, struct pt_regs *regs)
+omap_i2c_isr(int this_irq, void *dev_id)
 {
        struct omap_i2c_dev *dev = dev_id;
        u16 bits;
@@ -605,7 +605,8 @@ omap_i2c_probe(struct platform_device *pdev)
        adap->dev.parent = &pdev->dev;
 
        /* i2c device drivers may be active on return from add_adapter() */
-       r = i2c_add_adapter(adap);
+       adap->nr = pdev->id;
+       r = i2c_add_numbered_adapter(adap);
        if (r) {
                dev_err(dev->dev, "failure adding adapter\n");
                goto err_free_irq;