File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -614,10 +614,9 @@ static ssize_t show_boost(struct kobject *kobj,
614
614
static ssize_t store_boost (struct kobject * kobj , struct kobj_attribute * attr ,
615
615
const char * buf , size_t count )
616
616
{
617
- int ret , enable ;
617
+ bool enable ;
618
618
619
- ret = sscanf (buf , "%d" , & enable );
620
- if (ret != 1 || enable < 0 || enable > 1 )
619
+ if (kstrtobool (buf , & enable ))
621
620
return - EINVAL ;
622
621
623
622
if (cpufreq_boost_trigger_state (enable )) {
@@ -641,10 +640,10 @@ static ssize_t show_local_boost(struct cpufreq_policy *policy, char *buf)
641
640
static ssize_t store_local_boost (struct cpufreq_policy * policy ,
642
641
const char * buf , size_t count )
643
642
{
644
- int ret , enable ;
643
+ int ret ;
644
+ bool enable ;
645
645
646
- ret = kstrtoint (buf , 10 , & enable );
647
- if (ret || enable < 0 || enable > 1 )
646
+ if (kstrtobool (buf , & enable ))
648
647
return - EINVAL ;
649
648
650
649
if (!cpufreq_driver -> boost_enabled )
You can’t perform that action at this time.
0 commit comments