Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee13...
[pandora-kernel.git] / drivers / i2c / busses / i2c-pxa.c
index 86e2234..cd4ad98 100644 (file)
@@ -647,7 +647,7 @@ static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
 }
 
 /*
- * We are protected by the adapter bus semaphore.
+ * We are protected by the adapter bus mutex.
  */
 static int i2c_pxa_do_xfer(struct pxa_i2c *i2c, struct i2c_msg *msg, int num)
 {
@@ -861,7 +861,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id, struct pt_regs *r
                decode_ISR(isr);
        }
 
-       if (i2c->irqlogidx < sizeof(i2c->isrlog)/sizeof(u32))
+       if (i2c->irqlogidx < ARRAY_SIZE(i2c->isrlog))
                i2c->isrlog[i2c->irqlogidx++] = isr;
 
        show_state(i2c);
@@ -926,7 +926,7 @@ static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm i2c_pxa_algorithm = {
+static const struct i2c_algorithm i2c_pxa_algorithm = {
        .master_xfer    = i2c_pxa_xfer,
        .functionality  = i2c_pxa_functionality,
 };
@@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
 #endif
 
        pxa_set_cken(CKEN14_I2C, 1);
-       ret = request_irq(IRQ_I2C, i2c_pxa_handler, SA_INTERRUPT,
+       ret = request_irq(IRQ_I2C, i2c_pxa_handler, IRQF_DISABLED,
                          "pxa2xx-i2c", i2c);
        if (ret)
                goto out;