~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/lib/initcall.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2013 The Chromium OS Authors.
 
3
 *
 
4
 * SPDX-License-Identifier:     GPL-2.0+
 
5
 */
 
6
 
 
7
#include <common.h>
 
8
#include <initcall.h>
 
9
 
 
10
int initcall_run_list(init_fnc_t init_sequence[])
 
11
{
 
12
        init_fnc_t *init_fnc_ptr;
 
13
 
 
14
        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
 
15
                debug("initcall: %p\n", *init_fnc_ptr);
 
16
                if ((*init_fnc_ptr)()) {
 
17
                        debug("initcall sequence %p failed at call %p\n",
 
18
                              init_sequence, *init_fnc_ptr);
 
19
                        return -1;
 
20
                }
 
21
        }
 
22
        return 0;
 
23
}