staging: iio: light: isl29028: appropriately set interrupt flag
Preetham Chandru R [Thu, 31 Jan 2013 05:36:58 +0000 (10:36 +0530)]
set is_int_enable to true only if we register for a irq.

Bug 1211260

Change-Id: I603efe721796db70d504da7999e5d7939d45d13a
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/193047
(cherry picked from commit 8b89b2b64c67d80fcfc29cd4f6a92d4527e70df9)
Reviewed-on: http://git-master/r/195844
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/staging/iio/light/isl29028.c

index 0b1d2f2..5874c32 100644 (file)
@@ -1193,9 +1193,9 @@ static int __devinit isl29028_probe(struct i2c_client *client,
                                "error %d\n", chip->irq, err);
                        goto exit_free;
                }
+               chip->is_int_enable = true;
        }
 
-       chip->is_int_enable = true;
        chip->indio_dev = iio_allocate_device(0);
        if (!chip->indio_dev) {
                dev_err(&client->dev, "iio allocation fails\n");