aboutsummaryrefslogtreecommitdiff
path: root/drivers/gator/gator_events.sh
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2013-10-15 10:29:57 +0800
committerAlex Shi <alex.shi@linaro.org>2013-10-15 10:29:57 +0800
commit93570f4be17a7a1d420b79e8a05fb5fe0b452297 (patch)
treed2877817c6ad79bdf2fd511f8b629b17714822ef /drivers/gator/gator_events.sh
parent31d264741ef5baf75ec3d27c5b6e9bdda628748c (diff)
parent01239d6842a2e2653b7b42736cf2c10b69d0face (diff)
Merge remote-tracking branch 'arm-landing/lsk-3.10-gator' into linux-linaro-lsk-testlsk-13.10
Diffstat (limited to 'drivers/gator/gator_events.sh')
-rwxr-xr-xdrivers/gator/gator_events.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gator/gator_events.sh b/drivers/gator/gator_events.sh
new file mode 100755
index 00000000000..5467dd6d17d
--- /dev/null
+++ b/drivers/gator/gator_events.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+EVENTS=`grep gator_events_init *.c | sed 's/.\+gator_events_init(\(.\+\)).\+/\1/'`
+
+(
+ echo /\* This file is auto generated \*/
+ echo
+ for EVENT in $EVENTS; do
+ echo __weak int $EVENT\(void\)\;
+ done
+ echo
+ echo static int \(*gator_events_list[]\)\(void\) = {
+ for EVENT in $EVENTS; do
+ echo \ $EVENT,
+ done
+ echo }\;
+) > $1.tmp
+
+cmp -s $1 $1.tmp && rm $1.tmp || mv $1.tmp $1