Merge tag 'mvebu-fixes-3.19' of git://git.infradead.org/linux-mvebu into fixes
[cascardo/linux.git] / drivers / input / misc / ims-pcu.c
index afed8e2..ac1fa5f 100644 (file)
@@ -1851,7 +1851,7 @@ static int ims_pcu_identify_type(struct ims_pcu *pcu, u8 *device_id)
 
 static int ims_pcu_init_application_mode(struct ims_pcu *pcu)
 {
-       static atomic_t device_no = ATOMIC_INIT(0);
+       static atomic_t device_no = ATOMIC_INIT(-1);
 
        const struct ims_pcu_device_info *info;
        int error;
@@ -1882,7 +1882,7 @@ static int ims_pcu_init_application_mode(struct ims_pcu *pcu)
        }
 
        /* Device appears to be operable, complete initialization */
-       pcu->device_no = atomic_inc_return(&device_no) - 1;
+       pcu->device_no = atomic_inc_return(&device_no);
 
        /*
         * PCU-B devices, both GEN_1 and GEN_2 do not have OFN sensor