diff options
author | Paul Menzel <paulepanter@users.sourceforge.net> | 2013-02-23 21:31:23 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-02-25 18:47:00 +0100 |
commit | 528640d141193b4aaeb6b8956d4fbc7381df9eb3 (patch) | |
tree | 98e9dfa7e912b8187600d1347f369a02598d56a3 /src/mainboard/lippert | |
parent | 1fc7416545bde75d9cc401638f28ebfb751b663e (diff) |
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/lippert')
-rw-r--r-- | src/mainboard/lippert/hurricane-lx/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/lippert/literunner-lx/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/lippert/roadrunner-lx/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/lippert/spacerunner-lx/mainboard.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mainboard/lippert/hurricane-lx/mainboard.c b/src/mainboard/lippert/hurricane-lx/mainboard.c index f13e48bde3..5b9100b632 100644 --- a/src/mainboard/lippert/hurricane-lx/mainboard.c +++ b/src/mainboard/lippert/hurricane-lx/mainboard.c @@ -77,11 +77,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "LiPPERT Hurricane-LX EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/lippert/literunner-lx/mainboard.c b/src/mainboard/lippert/literunner-lx/mainboard.c index c1b8fc2735..c29098f0e0 100644 --- a/src/mainboard/lippert/literunner-lx/mainboard.c +++ b/src/mainboard/lippert/literunner-lx/mainboard.c @@ -81,11 +81,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "LiPPERT LiteRunner-LX EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/lippert/roadrunner-lx/mainboard.c b/src/mainboard/lippert/roadrunner-lx/mainboard.c index 22bcf43fdd..93a79707b6 100644 --- a/src/mainboard/lippert/roadrunner-lx/mainboard.c +++ b/src/mainboard/lippert/roadrunner-lx/mainboard.c @@ -71,11 +71,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "LiPPERT RoadRunner-LX EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/lippert/spacerunner-lx/mainboard.c b/src/mainboard/lippert/spacerunner-lx/mainboard.c index e2e6093099..6da1485db8 100644 --- a/src/mainboard/lippert/spacerunner-lx/mainboard.c +++ b/src/mainboard/lippert/spacerunner-lx/mainboard.c @@ -76,11 +76,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "LiPPERT SpaceRunner-LX EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; |