Sophie

Sophie

distrib > Mageia > 8 > i586 > by-pkgid > cd74e7f51809e7dfcdcd3d0d4b3173a2 > files > 5

cpufreqd-2.4.2-16.mga8.src.rpm

--- 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