i2c: designware-baytrail: cross-check lock functions
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 10 Feb 2015 17:06:09 +0000 (19:06 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 7 Mar 2015 00:08:06 +0000 (01:08 +0100)
It seems the idea behind the cross-check is to prevent acquire semaphore when
there is no release callback and vice versa. Thus, patch fixes a typo.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-baytrail.c

index d334744220035dc42f2a510d1ee826337022b103..036d9bdc0aaa9536973e80b1bf78182a1f134605 100644 (file)
@@ -71,7 +71,7 @@ static int baytrail_i2c_acquire(struct dw_i2c_dev *dev)
        if (!dev || !dev->dev)
                return -ENODEV;
 
-       if (!dev->acquire_lock)
+       if (!dev->release_lock)
                return 0;
 
        /* host driver writes to side band semaphore register */