File tree Expand file tree Collapse file tree 2 files changed +23
-21
lines changed Expand file tree Collapse file tree 2 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 41
41
/* Ondemand Sampling types */
42
42
enum {OD_NORMAL_SAMPLE , OD_SUB_SAMPLE };
43
43
44
- struct gov_attr_set {
45
- struct kobject kobj ;
46
- struct list_head policy_list ;
47
- struct mutex update_lock ;
48
- int usage_count ;
49
- };
50
-
51
- extern const struct sysfs_ops governor_sysfs_ops ;
52
-
53
- void gov_attr_set_init (struct gov_attr_set * attr_set , struct list_head * list_node );
54
- void gov_attr_set_get (struct gov_attr_set * attr_set , struct list_head * list_node );
55
- unsigned int gov_attr_set_put (struct gov_attr_set * attr_set , struct list_head * list_node );
56
-
57
44
/*
58
45
* Abbreviations:
59
46
* dbs: used as a shortform for demand based switching It helps to keep variable
@@ -80,14 +67,6 @@ static inline struct dbs_data *to_dbs_data(struct gov_attr_set *attr_set)
80
67
return container_of (attr_set , struct dbs_data , attr_set );
81
68
}
82
69
83
- /* Governor's specific attributes */
84
- struct governor_attr {
85
- struct attribute attr ;
86
- ssize_t (* show )(struct gov_attr_set * attr_set , char * buf );
87
- ssize_t (* store )(struct gov_attr_set * attr_set , const char * buf ,
88
- size_t count );
89
- };
90
-
91
70
#define gov_show_one (_gov , file_name ) \
92
71
static ssize_t show_##file_name \
93
72
(struct gov_attr_set *attr_set, char *buf) \
Original file line number Diff line number Diff line change @@ -462,6 +462,29 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor);
462
462
struct cpufreq_governor * cpufreq_default_governor (void );
463
463
struct cpufreq_governor * cpufreq_fallback_governor (void );
464
464
465
+ /* Governor attribute set */
466
+ struct gov_attr_set {
467
+ struct kobject kobj ;
468
+ struct list_head policy_list ;
469
+ struct mutex update_lock ;
470
+ int usage_count ;
471
+ };
472
+
473
+ /* sysfs ops for cpufreq governors */
474
+ extern const struct sysfs_ops governor_sysfs_ops ;
475
+
476
+ void gov_attr_set_init (struct gov_attr_set * attr_set , struct list_head * list_node );
477
+ void gov_attr_set_get (struct gov_attr_set * attr_set , struct list_head * list_node );
478
+ unsigned int gov_attr_set_put (struct gov_attr_set * attr_set , struct list_head * list_node );
479
+
480
+ /* Governor sysfs attribute */
481
+ struct governor_attr {
482
+ struct attribute attr ;
483
+ ssize_t (* show )(struct gov_attr_set * attr_set , char * buf );
484
+ ssize_t (* store )(struct gov_attr_set * attr_set , const char * buf ,
485
+ size_t count );
486
+ };
487
+
465
488
/*********************************************************************
466
489
* FREQUENCY TABLE HELPERS *
467
490
*********************************************************************/
You can’t perform that action at this time.
0 commit comments