On 09/03/2012 09:15 PM, Rafał Miłecki wrote: > 2012/8/31 Hauke Mehrtens <hauke@xxxxxxxxxx>: >> +u32 bcma_gpio_in(struct bcma_bus *bus, u32 mask) >> +{ >> + unsigned long flags; >> + u32 res = 0; >> + >> + spin_lock_irqsave(&bus->gpio_lock, flags); >> + res = bcma_chipco_gpio_in(&bus->drv_cc, mask); >> + spin_unlock_irqrestore(&bus->gpio_lock, flags); >> + >> + return res; >> +} >> +EXPORT_SYMBOL(bcma_gpio_in); > > > Could we put here direct ops on ChipCommon regs and drop GPIO > functions from driver_chipcommon.c? So you mean that all accesses to the gpio registers are locked, also when b43 or bcma accesses them? If so, I will change my patch and test it on my devices. I am currently not at my development machine and do not have the test devices here, but I will see if I find some time on Tuesday when I am home again. So bcma_chipco_gpio_XXX() should not be exported in the way it is done now any more and all accesses to the gpio registers should be locked. Hauke