]> Pileus Git - ~andy/linux/blobdiff - tools/perf/util/top.c
Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6
[~andy/linux] / tools / perf / util / top.c
index 7eeebcee291c4c70a8e0bc0dc0371d107080a1d9..884dde9b9bc1334294bc42d7d55bea65ba23f364 100644 (file)
@@ -58,8 +58,7 @@ size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size)
        }
 
        if (top->evlist->nr_entries == 1) {
-               struct perf_evsel *first;
-               first = list_entry(top->evlist->entries.next, struct perf_evsel, node);
+               struct perf_evsel *first = perf_evlist__first(top->evlist);
                ret += SNPRINTF(bf + ret, size - ret, "%" PRIu64 "%s ",
                                (uint64_t)first->attr.sample_period,
                                top->freq ? "Hz" : "");