summaryrefslogtreecommitdiff
path: root/src/mainboard/gigabyte
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2013-02-23 21:31:23 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-02-25 18:47:00 +0100
commit528640d141193b4aaeb6b8956d4fbc7381df9eb3 (patch)
tree98e9dfa7e912b8187600d1347f369a02598d56a3 /src/mainboard/gigabyte
parent1fc7416545bde75d9cc401638f28ebfb751b663e (diff)
downloadcoreboot-528640d141193b4aaeb6b8956d4fbc7381df9eb3.tar.xz
mainboard.c: Name enable_dev function uniformly `mainboard_enable`
To reduce the differences between these file name the enabling device function in the directory `src/mainboard` uniformly `mainboard_enable` [1]. Thanks to the awesome help of gnomon and BlastHardcheese in the IRC channel #sed on <irc.freenode.net>. gnomon came up with the following command to do the actual work. $ cd src/mainboard $ for f in */*/mainboard.c ; \ > do src="$(awk '/\.enable_dev = /{v=$NF; sub(/,$/,"",v); print v}' "$f")" ; \ > [[ -z $src ]] && continue ; \ > printf '%s\n' "g/${src}/s/${src}\([,(]\)/mainboard_enable\1/p" w | ed -s "$f" ; \ > done `src/mainboard/digitallogic/msm586seg/mainboard.c` and `src/mainboard/technologic/ts5300/mainboard.c` had to be adapted manually as no comma was used separating the struct members. And with the following statement, gnomon is even more likable! My pleasure entirely. Good luck with coreboot; I'm a big fan of the project. [1] http://www.coreboot.org/pipermail/coreboot/2013-February/074548.html Change-Id: Ife9cd0c2d9cc1ed14afc6d40063450553f06a6c6 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/2493 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/gigabyte')
-rw-r--r--src/mainboard/gigabyte/ma785gm/mainboard.c4
-rw-r--r--src/mainboard/gigabyte/ma785gmt/mainboard.c4
-rw-r--r--src/mainboard/gigabyte/ma78gm/mainboard.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/gigabyte/ma785gm/mainboard.c b/src/mainboard/gigabyte/ma785gm/mainboard.c
index 3ce0db624e..5b3a96333a 100644
--- a/src/mainboard/gigabyte/ma785gm/mainboard.c
+++ b/src/mainboard/gigabyte/ma785gm/mainboard.c
@@ -134,7 +134,7 @@ static void set_gpio40_gfx(void)
* enable the dedicated function in ma785gm board.
* This function called early than rs780_enable.
*************************************************/
-static void ma785gm_enable(device_t dev)
+static void mainboard_enable(device_t dev)
{
printk(BIOS_INFO, "Mainboard MA785GM-US2H Enable. dev=0x%p\n", dev);
@@ -144,5 +144,5 @@ static void ma785gm_enable(device_t dev)
}
struct chip_operations mainboard_ops = {
- .enable_dev = ma785gm_enable,
+ .enable_dev = mainboard_enable,
};
diff --git a/src/mainboard/gigabyte/ma785gmt/mainboard.c b/src/mainboard/gigabyte/ma785gmt/mainboard.c
index 8961bc89bf..7ed897f6dc 100644
--- a/src/mainboard/gigabyte/ma785gmt/mainboard.c
+++ b/src/mainboard/gigabyte/ma785gmt/mainboard.c
@@ -244,7 +244,7 @@ static void set_thermal_config(void)
* enable the dedicated function in ma785gmt board.
* This function called early than rs780_enable.
*************************************************/
-static void ma785gmt_enable(device_t dev)
+static void mainboard_enable(device_t dev)
{
printk(BIOS_INFO, "Mainboard MA785GMT-UD2H Enable. dev=0x%p\n", dev);
@@ -255,5 +255,5 @@ static void ma785gmt_enable(device_t dev)
}
struct chip_operations mainboard_ops = {
- .enable_dev = ma785gmt_enable,
+ .enable_dev = mainboard_enable,
};
diff --git a/src/mainboard/gigabyte/ma78gm/mainboard.c b/src/mainboard/gigabyte/ma78gm/mainboard.c
index 9a8e5dcb9e..5ac24201c9 100644
--- a/src/mainboard/gigabyte/ma78gm/mainboard.c
+++ b/src/mainboard/gigabyte/ma78gm/mainboard.c
@@ -71,7 +71,7 @@ u8 is_dev3_present(void)
* enable the dedicated function in board.
* This function called early than rs780_enable.
*************************************************/
-static void ma78gm_enable(device_t dev)
+static void mainboard_enable(device_t dev)
{
printk(BIOS_INFO, "Mainboard MA78GM-US2H Enable. dev=0x%p\n", dev);
@@ -80,5 +80,5 @@ static void ma78gm_enable(device_t dev)
}
struct chip_operations mainboard_ops = {
- .enable_dev = ma78gm_enable,
+ .enable_dev = mainboard_enable,
};