mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] generic-time: add macro to simplify/hide mask constants
Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct clocksource, and use it to replace literal mask constants in the various clocksource drivers. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
7d622d4794
commit
7f9f303aa3
6 changed files with 9 additions and 7 deletions
|
@ -65,6 +65,8 @@ struct clocksource {
|
|||
u64 interval_snsecs;
|
||||
};
|
||||
|
||||
/* simplify initialization of mask field */
|
||||
#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1)
|
||||
|
||||
/**
|
||||
* clocksource_khz2mult - calculates mult from khz and shift
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue