iio: imu: inv-mpu6xxx: Fix interrupt pin assignment
authorZhangbin Tong <zebulun.tong@rock-chips.com>
Wed, 29 Jun 2016 01:58:45 +0000 (09:58 +0800)
committerZhangbin Tong <zebulun.tong@rock-chips.com>
Wed, 29 Jun 2016 02:16:51 +0000 (10:16 +0800)
When add spi support, introduce a new bug that
i2c intrerupt pin assignment after request_irq.

Change-Id: Id41a953c8c7ea8a94a584c584ee012025a4a6921
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
drivers/staging/iio/imu/inv_mpu/inv_mpu_i2c.c

index af46094..95232da 100644 (file)
@@ -475,6 +475,7 @@ static int inv_mpu_probe(struct i2c_client *client,
                st->plat_data =
                        *(struct mpu_platform_data *)dev_get_platdata(&client->dev);
 
+       st->irq = client->irq;
        st->plat_read = inv_i2c_read;
        st->plat_single_write = inv_i2c_single_write;
        st->secondary_read = inv_i2c_secondary_read;
@@ -515,7 +516,6 @@ static int inv_mpu_probe(struct i2c_client *client,
                pr_err("configure ring buffer fail\n");
                goto out_free;
        }
-       st->irq = client->irq;
        st->dev = &client->dev;
        result = inv_mpu_probe_trigger(indio_dev);
        if (result) {