From 7f9f303aa33c7acc7b4aa9ebea25cbd990bc707b Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Mon, 26 Jun 2006 00:25:15 -0700 Subject: [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 Acked-by: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/clocksource.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 5f4a7f72f3ee..4bc94282c364 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -65,6 +65,8 @@ struct clocksource { u64 interval_snsecs; }; +/* simplify initialization of mask field */ +#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<