Hi Rongrong Zou, On Mon, Jan 11, 2016 at 07:12:10PM +0800, Rongrong Zou wrote: > I found a mutex lock in dw_i2c_dev for each adapter, > struct dw_i2c_dev { > struct device *dev; > void __iomem *base; > struct completion cmd_complete; > struct mutex lock; > struct clk *clk; > > but there is another lock: adapter->bus_lock, this lock is also > for each adapter, why we need both of them ? As far as I can see from the code the master_xfer callback is never called concurrently for the same adaptor. So indeed the internal lock looks redundant. I can't remember why I put it there. baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@xxxxxxxxxx - tel: +972.2.679.5364, http://www.tkos.co.il - -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html