spin_lock before writing status register

218 views Asked by At

I'm looking at linux driver where I see this:

spin_lock_bh(&driver->xy_lock);

/* code to clear a status bit from 32 bit PCI register */

iowrite32(...);

spin_unlock_bh(&driver->xy_lock);

Isn't this unnecessary to obtain a lock to clear a status bit? If not, why?

0

There are 0 answers