Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] I2C: i2c-ali1535: Drop redundant mutex

Drop a redundant mutex in driver i2c-ali1535. The struct i2c_adapter
includes a mutex for the same purpose, operated by i2c-core.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Jean Delvare and committed by
Greg Kroah-Hartman
0cbcb4d3 c006705e

-4
-4
drivers/i2c/busses/i2c-ali1535.c
··· 62 62 #include <linux/ioport.h> 63 63 #include <linux/i2c.h> 64 64 #include <linux/init.h> 65 - #include <linux/mutex.h> 66 65 #include <asm/io.h> 67 66 68 67 ··· 135 136 136 137 static struct pci_driver ali1535_driver; 137 138 static unsigned short ali1535_smba; 138 - static DEFINE_MUTEX(i2c_ali1535_mutex); 139 139 140 140 /* Detect whether a ALI1535 can be found, and initialize it, where necessary. 141 141 Note the differences between kernels with the old PCI BIOS interface and ··· 343 345 int timeout; 344 346 s32 result = 0; 345 347 346 - mutex_lock(&i2c_ali1535_mutex); 347 348 /* make sure SMBus is idle */ 348 349 temp = inb_p(SMBHSTSTS); 349 350 for (timeout = 0; ··· 457 460 break; 458 461 } 459 462 EXIT: 460 - mutex_unlock(&i2c_ali1535_mutex); 461 463 return result; 462 464 } 463 465