提交 a0558aca 编写于 作者: S Simon Glass 提交者: Tom Rini

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: NSimon Glass <sjg@chromium.org>
上级 41ba040e
......@@ -3,6 +3,10 @@
* Copyright (c) 2013 Google, Inc
*/
#ifdef _DM_H_
#warning "Suspect dm.h is included from a header file - please fix"
#endif
#ifndef _DM_H_
#define _DM_H_
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册