Skip to content

Commit

Permalink
Staging: crystalhd: Add global header
Browse files Browse the repository at this point in the history
In the crystalhd_cmds.h there was a struct dependence bug:
the struct crystalhd_adp (which  is declared on crystalhd_lnx.h)
is used on  the crystalhd_cmd struct, however the crystalhd_lnx.h is
never included on crystalhd_cmds.h at all. Including the
crystalhd_lnx.h on crystalhd_cmds.h breaks the build,
many dependencies error occurrs, most of the type
"error: 'struct bar' has no member named 'foo'",
so I decided to reorganize the headers by adding a global header.

The gobal header crystalhd.h includes all the local headers.
The idea is that the crystalhd header will be the only included
by the others files, this will avoid the mess of many #include levels.

The order of the headers included by crystalhd.h considers the
dependencies among the headers.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jorgyano Vieira authored and Greg Kroah-Hartman committed Feb 29, 2012
1 parent 3be1113 commit 4768f3f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/staging/crystalhd/crystalhd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef _CRYSTALHD_H_
#define _CRYSTALHD_H_

#include <asm/system.h>
#include "bc_dts_defs.h"
#include "crystalhd_misc.h"
#include "bc_dts_glob_lnx.h"
#include "crystalhd_hw.h"
#include "crystalhd_cmds.h"
#include "crystalhd_lnx.h"
#include "bcm_70012_regs.h"
#include "crystalhd_fw_if.h"

#endif

0 comments on commit 4768f3f

Please sign in to comment.