Mageia Bugzilla – Attachment 9399 Details for
Bug 21067
Patch for cpufreqd - acpi current_now->power_now
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
cpufreqd-patch-power_now
cpufreqd-power_now.patch (text/plain), 1.63 KB, created by
Stig-Ørjan Smelror
on 2017-06-10 14:47:46 CEST
(
hide
)
Description:
cpufreqd-patch-power_now
Filename:
MIME Type:
Creator:
Stig-Ørjan Smelror
Created:
2017-06-10 14:47:46 CEST
Size:
1.63 KB
patch
obsolete
>--- cpufreqd-2.4.2/src/cpufreqd_acpi_battery.c 2010-03-28 13:34:54.000000000 +0200 >+++ cpufreqd-2.4.2-a/src/cpufreqd_acpi_battery.c 2017-05-31 04:28:40.924835054 +0200 >@@ -35,7 +35,7 @@ > #define CHARGE_NOW "charge_now" > #define PRESENT "present" > #define STATUS "status" >-#define CURRENT_NOW "current_now" >+#define POWER_NOW "power_now" > > struct battery_info { > int capacity; >@@ -49,7 +49,7 @@ > struct sysfs_attribute *energy_now; /* remaining capacity */ > struct sysfs_attribute *present; > struct sysfs_attribute *status; >- struct sysfs_attribute *current_now; /* present rate */ >+ struct sysfs_attribute *power_now; /* present rate */ > > int open; > }; >@@ -95,8 +95,8 @@ > put_attribute(binfo->present); > if (binfo->status) > put_attribute(binfo->status); >- if (binfo->current_now) >- put_attribute(binfo->current_now); >+ if (binfo->power_now) >+ put_attribute(binfo->power_now); > > binfo->open = 0; > } >@@ -104,7 +104,7 @@ > static int read_battery(struct battery_info *binfo) { > clog(LOG_DEBUG, "%s - reading battery levels\n", binfo->cdev->name); > >- if (read_int(binfo->current_now, &binfo->present_rate) != 0) { >+ if (read_int(binfo->power_now, &binfo->present_rate) != 0) { > clog(LOG_ERR, "Skipping %s\n", binfo->cdev->name); > return -1; > } >@@ -145,8 +145,8 @@ > binfo->status = get_class_device_attribute(binfo->cdev, STATUS); > if (!binfo->status) > return -1; >- binfo->current_now = get_class_device_attribute(binfo->cdev, CURRENT_NOW); >- if (!binfo->current_now) >+ binfo->power_now = get_class_device_attribute(binfo->cdev, POWER_NOW); >+ if (!binfo->power_now) > return -1; > > /* read the last full capacity, this is not going to change
--- cpufreqd-2.4.2/src/cpufreqd_acpi_battery.c 2010-03-28 13:34:54.000000000 +0200 +++ cpufreqd-2.4.2-a/src/cpufreqd_acpi_battery.c 2017-05-31 04:28:40.924835054 +0200 @@ -35,7 +35,7 @@ #define CHARGE_NOW "charge_now" #define PRESENT "present" #define STATUS "status" -#define CURRENT_NOW "current_now" +#define POWER_NOW "power_now" struct battery_info { int capacity; @@ -49,7 +49,7 @@ struct sysfs_attribute *energy_now; /* remaining capacity */ struct sysfs_attribute *present; struct sysfs_attribute *status; - struct sysfs_attribute *current_now; /* present rate */ + struct sysfs_attribute *power_now; /* present rate */ int open; }; @@ -95,8 +95,8 @@ put_attribute(binfo->present); if (binfo->status) put_attribute(binfo->status); - if (binfo->current_now) - put_attribute(binfo->current_now); + if (binfo->power_now) + put_attribute(binfo->power_now); binfo->open = 0; } @@ -104,7 +104,7 @@ static int read_battery(struct battery_info *binfo) { clog(LOG_DEBUG, "%s - reading battery levels\n", binfo->cdev->name); - if (read_int(binfo->current_now, &binfo->present_rate) != 0) { + if (read_int(binfo->power_now, &binfo->present_rate) != 0) { clog(LOG_ERR, "Skipping %s\n", binfo->cdev->name); return -1; } @@ -145,8 +145,8 @@ binfo->status = get_class_device_attribute(binfo->cdev, STATUS); if (!binfo->status) return -1; - binfo->current_now = get_class_device_attribute(binfo->cdev, CURRENT_NOW); - if (!binfo->current_now) + binfo->power_now = get_class_device_attribute(binfo->cdev, POWER_NOW); + if (!binfo->power_now) return -1; /* read the last full capacity, this is not going to change
View Attachment As Raw
Actions:
View
Attachments on
bug 21067
: 9399