summaryrefslogtreecommitdiff
path: root/sys-power/phc-intel
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-power/phc-intel
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-power/phc-intel')
-rw-r--r--sys-power/phc-intel/Manifest3
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch1179
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch51
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch51
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch51
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch51
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch51
-rw-r--r--sys-power/phc-intel/metadata.xml8
-rw-r--r--sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild70
-rw-r--r--sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild72
-rw-r--r--sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild72
11 files changed, 1659 insertions, 0 deletions
diff --git a/sys-power/phc-intel/Manifest b/sys-power/phc-intel/Manifest
new file mode 100644
index 00000000000..0d39c094a59
--- /dev/null
+++ b/sys-power/phc-intel/Manifest
@@ -0,0 +1,3 @@
+DIST phc-intel-pack-rev15.1.tar.bz2 97762 SHA256 5154295f2cfc0e263510d71041a2d1d9a0d2e7a0c67730c9f80ba1011bbde8a4 SHA512 e0163f315343bb34dde57cb806d99b6ea6586b54827142a49532d862cbe02689d581e221ebd6466d1992107e4d98456989402ba4172e85b9e9f24405f27d28f1 WHIRLPOOL 5c02326541d0773cff668919d0d4809f3b79fd3bff6149c62d136760d440e5338b2a9e00a236f25bcb6dead4a65f74e4f1d3763a38bb996ddef315664758b621
+DIST phc-intel-pack-rev16.tar.bz2 100320 SHA256 545de96d22aee47cfe5b6292a0f55797cbc18aa03ca050831d8ff964be1896ca SHA512 bfe502e67f68ec7b4dbae77f0e2b57876928c6d5047697842c397a1d622978c270b85d0c5f83d22ca74a48942da60ab2b78e405ba866f55ee937f5b530f5165e WHIRLPOOL 0a693ee1a31047c7f3ba404ec7906045a54c94b48963da1274f24ee9f8f9ddb0f8fcc6e8c5a9b096594bd3b26f32de9058e60ca21d429d2c9bb7993944b32f6e
+DIST phc-intel-pack-rev17.tar.bz2 100565 SHA256 97e8659423ff9ce5e7f77e5e4049b100677a37b05a341d294aba286de1bbaeb9 SHA512 0db84ae3e366ff95577ee89b2e1cb22778fdba76783aa2606b6b5925e46c6e5daf80a7365eba6f3f806a017daa98d7b20828c644a3967f180c612e7c92a94871 WHIRLPOOL 795c73daeda3b42306560d799cd7d180e9f0888dc11ec36b2236a1ee000754780c0f299ebaec0ca4e1a73ca1326f0957d46823fb7500db28bd8b0946b24ec522
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch
new file mode 100644
index 00000000000..d20fb73a4fd
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev12-trailing-space-misc.patch
@@ -0,0 +1,1179 @@
+Remove trailing white spaces from /proc output.
+
+Signed-off-by: Michael Weber <xmw@gentoo.org>
+--- phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -757,12 +769,477 @@
++@@ -757,12 +769,482 @@
+ data->resume = 1;
+
+ return 0;
+@@ -156,6 +156,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -185,6 +186,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -211,6 +213,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -239,6 +242,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -270,6 +274,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch
+@@ -74,7 +74,7 @@
+
+ return 0;
+ }
+-@@ -758,12 +770,477 @@
++@@ -758,12 +770,482 @@
+ data->resume = 1;
+
+ return 0;
+@@ -157,6 +157,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -186,6 +187,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -212,6 +214,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -240,6 +243,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -271,6 +275,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -758,12 +770,477 @@
++@@ -758,12 +770,482 @@
+ data->resume = 1;
+
+ return 0;
+@@ -156,6 +156,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -185,6 +186,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -211,6 +213,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -239,6 +242,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -270,6 +274,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -778,12 +790,477 @@
++@@ -778,12 +790,482 @@
+ data->resume = 1;
+
+ return 0;
+@@ -156,6 +156,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -185,6 +186,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -211,6 +213,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -239,6 +242,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -270,6 +274,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -790,12 +802,477 @@
++@@ -790,12 +802,482 @@
+ data->resume = 1;
+
+ return 0;
+@@ -156,6 +156,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -185,6 +186,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -211,6 +213,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -239,6 +242,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -270,6 +274,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -797,12 +809,474 @@
++@@ -797,12 +809,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -152,6 +152,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -181,6 +182,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -207,6 +209,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -235,6 +238,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -266,6 +270,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -793,12 +805,474 @@
++@@ -793,12 +805,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -756,12 +768,474 @@
++@@ -756,12 +768,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -757,12 +769,474 @@
++@@ -757,12 +769,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -154,6 +154,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -183,6 +184,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -209,6 +211,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -237,6 +240,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -268,6 +272,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -758,12 +770,474 @@
++@@ -758,12 +770,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -759,12 +771,474 @@
++@@ -759,12 +771,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -154,6 +154,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -183,6 +184,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -209,6 +211,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -237,6 +240,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -268,6 +272,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -759,12 +771,474 @@
++@@ -759,12 +771,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -760,12 +772,474 @@
++@@ -760,12 +772,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -154,6 +154,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -183,6 +184,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -209,6 +211,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -237,6 +240,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -268,6 +272,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -719,12 +731,474 @@
++@@ -719,12 +731,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -720,12 +732,474 @@
++@@ -720,12 +732,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -154,6 +154,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -183,6 +184,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -209,6 +211,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -237,6 +240,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -268,6 +272,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch
+@@ -72,7 +72,7 @@
+
+ return 0;
+ }
+-@@ -716,12 +728,474 @@
++@@ -716,12 +728,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -153,6 +153,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -182,6 +183,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -208,6 +210,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -236,6 +239,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -267,6 +271,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch
+@@ -73,7 +73,7 @@
+
+ return 0;
+ }
+-@@ -717,12 +729,474 @@
++@@ -717,12 +729,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -154,6 +154,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -183,6 +184,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -209,6 +211,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -237,6 +240,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -268,6 +272,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch
+@@ -71,7 +71,7 @@
+ }
+
+ return 0;
+-@@ -717,12 +729,474 @@
++@@ -717,12 +729,479 @@
+ data->resume = 1;
+
+ return 0;
+@@ -152,6 +152,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -181,6 +182,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -207,6 +209,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -235,6 +238,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -266,6 +270,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch
+@@ -120,7 +120,7 @@
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+ msrs = msrs_alloc();
+
+-@@ -963,10 +965,484 @@
++@@ -963,10 +965,489 @@
+ msrs_free(msrs);
+ msrs = NULL;
+ }
+@@ -198,6 +198,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -227,6 +228,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -253,6 +255,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -281,6 +284,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -312,6 +316,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch
+@@ -122,7 +122,7 @@
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+ msrs = msrs_alloc();
+
+-@@ -986,10 +987,485 @@
++@@ -986,10 +987,490 @@
+ msrs_free(msrs);
+ msrs = NULL;
+ }
+@@ -200,6 +200,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -229,6 +230,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -255,6 +257,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -283,6 +286,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -314,6 +318,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch
+@@ -120,7 +120,7 @@
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+ msrs = msrs_alloc();
+
+-@@ -966,10 +968,484 @@
++@@ -966,10 +968,489 @@
+ msrs_free(msrs);
+ msrs = NULL;
+ }
+@@ -198,6 +198,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -227,6 +228,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -253,6 +255,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -281,6 +284,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -312,6 +316,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+--- phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch
+@@ -120,7 +120,7 @@
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+ msrs = msrs_alloc();
+
+-@@ -970,10 +972,484 @@
++@@ -970,10 +972,489 @@
+ msrs_free(msrs);
+ msrs = NULL;
+ }
+@@ -198,6 +198,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -227,6 +228,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -253,6 +255,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -281,6 +284,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -312,6 +316,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+Remove trailing white spaces from /proc output.
+
+Signed-off-by: Michael Weber <xmw@gentoo.org>
+--- phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch
+@@ -97,7 +97,7 @@
+ static void __init acpi_cpufreq_boost_init(void)
+ {
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+-@@ -982,6 +983,480 @@
++@@ -982,6 +983,485 @@
+ }
+ }
+
+@@ -173,6 +173,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -202,6 +203,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -228,6 +230,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -256,6 +259,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -287,6 +291,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch
new file mode 100644
index 00000000000..4e1e4dfc854
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.13.patch
@@ -0,0 +1,51 @@
+--- phc-intel-pack-rev14/inc/3.13/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev14/inc/3.13/linux-phc-0.3.2.patch
+@@ -197,7 +197,7 @@
+ static void __init acpi_cpufreq_boost_init(void)
+ {
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+-@@ -956,6 +1050,480 @@
++@@ -956,6 +1050,485 @@
+ }
+ }
+
+@@ -273,6 +273,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -302,6 +303,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -328,6 +330,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -356,6 +359,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -387,6 +391,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch
new file mode 100644
index 00000000000..19c1b546fb7
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev14-trailing-space-3.14.patch
@@ -0,0 +1,51 @@
+--- phc-intel-pack-rev14/inc/3.14/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev14/inc/3.14/linux-phc-0.3.2.patch
+@@ -198,7 +198,7 @@
+ static void __init acpi_cpufreq_boost_init(void)
+ {
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+-@@ -929,6 +1022,481 @@
++@@ -929,6 +1022,486 @@
+ }
+ }
+
+@@ -274,6 +274,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -303,6 +304,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -329,6 +331,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -357,6 +360,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -388,6 +392,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch
new file mode 100644
index 00000000000..e1db916f719
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.15.patch
@@ -0,0 +1,51 @@
+--- phc-intel-pack-rev15.1/inc/3.15/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev15.1/inc/3.15/linux-phc-0.3.2.patch
+@@ -198,7 +198,7 @@
+ static void __init acpi_cpufreq_boost_init(void)
+ {
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+-@@ -929,6 +1022,481 @@
++@@ -929,6 +1022,486 @@
+ }
+ }
+
+@@ -274,6 +274,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -303,6 +304,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -329,6 +331,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -357,6 +360,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -388,6 +392,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch
new file mode 100644
index 00000000000..01bf10bba48
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-trailing-space-3.5.patch
@@ -0,0 +1,51 @@
+--- phc-intel-pack-rev15.1/inc/3.5/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev15.1/inc/3.5/linux-phc-0.3.2.patch
+@@ -55,7 +55,7 @@
+ kfree(data->freq_table);
+ kfree(data);
+ }
+-@@ -716,8 +728,470 @@
++@@ -716,8 +728,475 @@
+ return 0;
+ }
+
+@@ -134,6 +134,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -163,6 +164,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -189,6 +191,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -217,6 +220,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -248,6 +252,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch b/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch
new file mode 100644
index 00000000000..1934d9cde11
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2-rev16-trailing-space-3.16.patch
@@ -0,0 +1,51 @@
+--- phc-intel-pack-rev16/inc/3.16/linux-phc-0.3.2.patch
++++ phc-intel-pack-rev16/inc/3.16/linux-phc-0.3.2.patch
+@@ -195,7 +195,7 @@
+ static void __init acpi_cpufreq_boost_init(void)
+ {
+ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) {
+-@@ -928,6 +1019,481 @@
++@@ -928,6 +1019,486 @@
+ }
+ }
+
+@@ -271,6 +271,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -300,6 +301,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u ", vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -326,6 +328,7 @@
+ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u ", fid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -354,6 +357,7 @@
+ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
+@@ -385,6 +389,7 @@
+ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]);
+ + count += sprintf(&buf[count], "%u:%u ", fid, vid);
+ + }
+++ if (count) count--;
+ + count += sprintf(&buf[count], "\n");
+ +
+ + return count;
diff --git a/sys-power/phc-intel/metadata.xml b/sys-power/phc-intel/metadata.xml
new file mode 100644
index 00000000000..5b80fb94c39
--- /dev/null
+++ b/sys-power/phc-intel/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild
new file mode 100644
index 00000000000..de791a008df
--- /dev/null
+++ b/sys-power/phc-intel/phc-intel-0.3.2.12.15.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod eutils
+
+DESCRIPTION="Processor Hardware Control for Intel CPUs"
+HOMEPAGE="http://www.linux-phc.org/
+ http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267"
+#no automatic filenames here, sorry
+SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=161 -> phc-intel-pack-rev15.1.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="~!X86_ACPI_CPUFREQ"
+ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel."
+
+MODULE_NAMES="phc-intel(misc:)"
+BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1"
+BUILD_TARGETS="all"
+
+S=${WORKDIR}/${A/.tar.bz2}
+
+pkg_setup() {
+ if kernel_is lt 2 6 27 ; then
+ eerror "Your kernel version is no longer supported by this version of ${PN}."
+ eerror "Please use a previous version of ${PN} or a newer kernel."
+ die
+ fi
+ if kernel_is gt 3 15 ; then
+ eerror "Your kernel version is not yet supported by this version of ${PN}."
+ eerror "Please use a newer version of ${PN} or an older kernel."
+ die
+ fi
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch
+
+ sed -e '/^all:/s:prepare::' \
+ -i Makefile || die
+
+ local my_sub=arch/x86/kernel/cpu
+ if kernel_is gt 2 6 39 ; then
+ my_sub=drivers
+ fi
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die
+ if kernel_is lt 3 12 ; then
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die
+ fi
+
+ if kernel_is lt 3 0 ; then
+ epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch
+ else
+ epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch
+ fi
+
+ mv acpi-cpufreq.c phc-intel.c || die
+}
diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild
new file mode 100644
index 00000000000..0c6bad24c3a
--- /dev/null
+++ b/sys-power/phc-intel/phc-intel-0.3.2.12.16.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod eutils
+
+DESCRIPTION="Processor Hardware Control for Intel CPUs"
+HOMEPAGE="http://www.linux-phc.org/
+ http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267"
+#no automatic filenames here, sorry
+SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=162 -> phc-intel-pack-rev16.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="~!X86_ACPI_CPUFREQ"
+ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel."
+
+MODULE_NAMES="phc-intel(misc:)"
+BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1"
+BUILD_TARGETS="all"
+
+S=${WORKDIR}/${A/.tar.bz2}
+
+pkg_setup() {
+ if kernel_is lt 2 6 27 ; then
+ eerror "Your kernel version is no longer supported by this version of ${PN}."
+ eerror "Please use a previous version of ${PN} or a newer kernel."
+ die
+ fi
+ if kernel_is gt 3 19 ; then
+ eerror "Your kernel version is not yet tested with this version of ${PN}."
+ eerror "It might not build or expose runtime problems."
+ fi
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev16-trailing-space-3.16.patch
+
+ sed -e '/^all:/s:prepare::' \
+ -i Makefile || die
+
+ local my_sub=arch/x86/kernel/cpu
+ if kernel_is gt 2 6 39 ; then
+ my_sub=drivers
+ fi
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die
+ if kernel_is lt 3 12 ; then
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die
+ fi
+
+ if kernel_is lt 3 0 ; then
+ epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch
+ elif kernel_is lt 3 17 ; then
+ epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch
+ else
+ epatch inc/3.16/linux-phc-0.3.2.patch
+ fi
+
+ mv acpi-cpufreq.c phc-intel.c || die
+}
diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild
new file mode 100644
index 00000000000..02ce12628d5
--- /dev/null
+++ b/sys-power/phc-intel/phc-intel-0.3.2.12.17.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info linux-mod eutils
+
+DESCRIPTION="Processor Hardware Control for Intel CPUs"
+HOMEPAGE="http://www.linux-phc.org/
+ http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267"
+#no automatic filenames here, sorry
+SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=166 -> phc-intel-pack-rev17.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="~!X86_ACPI_CPUFREQ"
+ERROR_X86_ACPI_CPUFREQ="CONFIG_X86_ACPI_CPUFREQ has to be configured to Module to enable the replacement of acpi-cpufreq with phc-intel."
+
+MODULE_NAMES="phc-intel(misc:)"
+BUILD_PARAMS="KERNELSRC=\"${KERNEL_DIR}\" -j1"
+BUILD_TARGETS="all"
+
+S=${WORKDIR}/${A/.tar.bz2}
+
+pkg_setup() {
+ if kernel_is lt 2 6 27 ; then
+ eerror "Your kernel version is no longer supported by this version of ${PN}."
+ eerror "Please use a previous version of ${PN} or a newer kernel."
+ die
+ fi
+ if kernel_is gt 4 0 ; then
+ eerror "Your kernel version is not yet tested with this version of ${PN}."
+ eerror "It might not build or expose runtime problems."
+ fi
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev12-trailing-space-misc.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.5.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.13.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev14-trailing-space-3.14.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev15-trailing-space-3.15.patch \
+ "${FILESDIR}"/phc-intel-0.3.2-rev16-trailing-space-3.16.patch
+
+ sed -e '/^all:/s:prepare::' \
+ -i Makefile || die
+
+ local my_sub=arch/x86/kernel/cpu
+ if kernel_is gt 2 6 39 ; then
+ my_sub=drivers
+ fi
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/acpi-cpufreq.c . || die
+ if kernel_is lt 3 12 ; then
+ cp -v "${KERNEL_DIR}"/${my_sub}/cpufreq/mperf.h . || die
+ fi
+
+ if kernel_is lt 3 0 ; then
+ epatch inc/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/linux-phc-0.3.2.patch
+ elif kernel_is lt 3 17 ; then
+ epatch inc/${KV_MAJOR}.${KV_MINOR}/linux-phc-0.3.2.patch
+ else
+ epatch inc/3.16/linux-phc-0.3.2.patch
+ fi
+
+ mv acpi-cpufreq.c phc-intel.c || die
+}