Commit c626a43
committed
cpufreq: intel_pstate: Rearrange show_no_turbo() and store_no_turbo()
Now that global.turbo_disabled can only change at the cpufreq driver
registration time, initialize global.no_turbo at that time too so they
are in sync to start with (if the former is set, the latter cannot be
updated later anyway).
That allows show_no_turbo() to be simlified because it does not need
to check global.turbo_disabled and store_no_turbo() can be rearranged
to avoid doing anything if the new value of global.no_turbo is equal
to the current one and only return an error on attempts to clear
global.no_turbo when global.turbo_disabled.
While at it, eliminate the redundant ret variable from store_no_turbo().
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>1 parent 0940f1a commit c626a43
1 file changed
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
| 1265 | + | |
1269 | 1266 | | |
1270 | 1267 | | |
1271 | 1268 | | |
| |||
1276 | 1273 | | |
1277 | 1274 | | |
1278 | 1275 | | |
1279 | | - | |
| 1276 | + | |
1280 | 1277 | | |
1281 | | - | |
1282 | | - | |
| 1278 | + | |
1283 | 1279 | | |
1284 | 1280 | | |
1285 | 1281 | | |
1286 | 1282 | | |
1287 | 1283 | | |
1288 | | - | |
1289 | | - | |
| 1284 | + | |
| 1285 | + | |
1290 | 1286 | | |
1291 | 1287 | | |
1292 | | - | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1293 | 1292 | | |
1294 | 1293 | | |
1295 | 1294 | | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
| 1295 | + | |
| 1296 | + | |
1299 | 1297 | | |
1300 | 1298 | | |
1301 | | - | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1302 | 1302 | | |
1303 | | - | |
| 1303 | + | |
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
| |||
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | | - | |
| 1315 | + | |
1316 | 1316 | | |
| 1317 | + | |
1317 | 1318 | | |
1318 | 1319 | | |
1319 | 1320 | | |
| |||
3094 | 3095 | | |
3095 | 3096 | | |
3096 | 3097 | | |
| 3098 | + | |
3097 | 3099 | | |
3098 | 3100 | | |
3099 | 3101 | | |
| |||
0 commit comments