rasd: Use the event ID from the event format

The ID field of every event is included in the event format. Use the ID
as provided by the format parsing code.

Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-10-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
diff --git a/src/evsel.c b/src/evsel.c
index 8e46e8f..12655bd 100644
--- a/src/evsel.c
+++ b/src/evsel.c
@@ -1,6 +1,7 @@
 #include "ras.h"
 #include "cpumap.h"
 #include "debug.h"
+#include "event-parse.h"
 #include "evsel.h"
 #include "trace_event.h"
 #include "xyarray.h"
@@ -182,9 +183,7 @@
 			goto out_free;
 
 		event_attr_init(&attr);
-		/*
 		attr.config = evsel->tp_format->id;
-		*/
 		attr.sample_period = 1;
 		perf_evsel__init(evsel, &attr, idx);
 	}
diff --git a/src/rasd.c b/src/rasd.c
index a72f854..5dce550 100644
--- a/src/rasd.c
+++ b/src/rasd.c
@@ -73,7 +73,10 @@
 	if (extract_sys_name(str, &rasd.sys, &rasd.name))
 		err("invalid event specified, syntax is sys:name");
 
-	/* Initialize tracepoint evsel */
+	/*
+	 * Initialize tracepoint evsel from the event name and
+	 * fill in the attr fields
+	 */
 	tp = perf_evsel__newtp_idx(rasd.sys, rasd.name, idx);
 	if (!tp)
 		err("init tracepoint evsel, idx: %d", idx);