mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
dm: core: Guard against including dm.h in header files
Header files generally should not include header files just for a struct, since forward declarations work just as well and reduce overhead. Add a warning for dm.h being included, since this has crept into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
41ba040e16
commit
a0558aca55
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,10 @@
|
||||||
* Copyright (c) 2013 Google, Inc
|
* Copyright (c) 2013 Google, Inc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef _DM_H_
|
||||||
|
#warning "Suspect dm.h is included from a header file - please fix"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _DM_H_
|
#ifndef _DM_H_
|
||||||
#define _DM_H_
|
#define _DM_H_
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue