Merge tag 'gpio-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[linux-2.6-block.git] / drivers / gpio / gpio-menz127.c
index 334fe270dcf18295564afb90ae0827d13f84e7bd..cc103aff45e45fc4d76faa2137770b0742730d0e 100644 (file)
@@ -36,7 +36,6 @@ struct men_z127_gpio {
        struct gpio_chip gc;
        void __iomem *reg_base;
        struct resource *mem;
-       spinlock_t lock;
 };
 
 static int men_z127_debounce(struct gpio_chip *gc, unsigned gpio,
@@ -68,7 +67,7 @@ static int men_z127_debounce(struct gpio_chip *gc, unsigned gpio,
                debounce /= 50;
        }
 
-       spin_lock(&priv->lock);
+       spin_lock(&gc->bgpio_lock);
 
        db_en = readl(priv->reg_base + MEN_Z127_DBER);
 
@@ -83,7 +82,7 @@ static int men_z127_debounce(struct gpio_chip *gc, unsigned gpio,
        writel(db_en, priv->reg_base + MEN_Z127_DBER);
        writel(db_cnt, priv->reg_base + GPIO_TO_DBCNT_REG(gpio));
 
-       spin_unlock(&priv->lock);
+       spin_unlock(&gc->bgpio_lock);
 
        return 0;
 }
@@ -99,7 +98,7 @@ static int men_z127_set_single_ended(struct gpio_chip *gc,
            mode != LINE_MODE_PUSH_PULL)
                return -ENOTSUPP;
 
-       spin_lock(&priv->lock);
+       spin_lock(&gc->bgpio_lock);
        od_en = readl(priv->reg_base + MEN_Z127_ODER);
 
        if (mode == LINE_MODE_OPEN_DRAIN)
@@ -109,7 +108,7 @@ static int men_z127_set_single_ended(struct gpio_chip *gc,
                od_en &= ~BIT(offset);
 
        writel(od_en, priv->reg_base + MEN_Z127_ODER);
-       spin_unlock(&priv->lock);
+       spin_unlock(&gc->bgpio_lock);
 
        return 0;
 }