On 20.10.2009 23:38, Carl-Daniel Hailfinger wrote:
Chip locking has three actions you can do with it:
- Print/read the current locking status
- Lock the chip
- Unlock the chip.
Currently, the code usually does lock printing inside the probe function, and unlocking somewhere in the erase or write function. Only very few chips reactivate the lock after write/erase. Since many chips have identical probe/write/erase functions, but totally different locking, many such functions have been duplicated needlessly. With this patch, it is possible to call the chip-specific locking functions from probe/write/erase functions and unify lots of code.
I converted spi.c and pm49fl00x.c to use the internal lock abstractions, but all other files need the same treatment.
Signed-off-by: Carl-Daniel Hailfinger email@example.com
Ping? This is one month old.