|
@@ -515,7 +515,7 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
|
|
|
/*
|
|
|
* High resolution timer enabled ?
|
|
|
*/
|
|
|
-static int hrtimer_hres_enabled __read_mostly = 1;
|
|
|
+static bool hrtimer_hres_enabled __read_mostly = true;
|
|
|
unsigned int hrtimer_resolution __read_mostly = LOW_RES_NSEC;
|
|
|
EXPORT_SYMBOL_GPL(hrtimer_resolution);
|
|
|
|
|
@@ -524,13 +524,7 @@ EXPORT_SYMBOL_GPL(hrtimer_resolution);
|
|
|
*/
|
|
|
static int __init setup_hrtimer_hres(char *str)
|
|
|
{
|
|
|
- if (!strcmp(str, "off"))
|
|
|
- hrtimer_hres_enabled = 0;
|
|
|
- else if (!strcmp(str, "on"))
|
|
|
- hrtimer_hres_enabled = 1;
|
|
|
- else
|
|
|
- return 0;
|
|
|
- return 1;
|
|
|
+ return (kstrtobool(str, &hrtimer_hres_enabled) == 0);
|
|
|
}
|
|
|
|
|
|
__setup("highres=", setup_hrtimer_hres);
|