gpio: pca953x: fix an incorrect lockdep warning
[cascardo/linux.git] / drivers / gpio / gpio-pca953x.c
index 02f2a56..892dc04 100644 (file)
@@ -786,6 +786,8 @@ static int pca953x_probe(struct i2c_client *client,
        chip->chip_type = PCA_CHIP_TYPE(chip->driver_data);
 
        mutex_init(&chip->i2c_lock);
+       lockdep_set_subclass(&chip->i2c_lock,
+                            i2c_adapter_depth(client->adapter));
 
        /* initialize cached registers from their original values.
         * we can't share this chip with another i2c master.