主题 : <asm/hardware.h>与</include/asm-arm/arch-s3c2410/hardware.h>的困惑 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 10191
精华: 0
发帖: 9
金钱: 85 两
威望: 38 点
综合积分: 18 分
注册时间: 2009-10-27
最后登录: 2010-04-21
楼主  发表于: 2010-01-20 09:54

 <asm/hardware.h>与</include/asm-arm/arch-s3c2410/hardware.h>的困惑

在 led 的驱动程序中,有如下语句:
#include <linux/delay.h>
#include <asm/irq.h>
#include <asm/arch/regs-gpio.h>
#include <asm/hardware.h>


但在实际的项目中,根本没有 "/include/asm" 这个文件夹,只有 "/include/asm-arm/arch-s3c2410/hardware.h" 目录。本以为上述情况应该编译不通过,结果却完整的编译出了led.ko模块文件。

请问,为什么在<asm/hardware.h>文件找不到的情况下,依然能够顺利编译通过?<asm/hardware.h><asm-arm/arch-s3c2410/hardware.h>有什么关系?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-01-20 10:40
为什么不再看一眼内核源代码的include目录?里面一定有asm->asm-arm这个符号链接;
同样的道理,在include/asm-arm目录下,一定有arch->arch-s3c2410这个符号链接。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 10191
精华: 0
发帖: 9
金钱: 85 两
威望: 38 点
综合积分: 18 分
注册时间: 2009-10-27
最后登录: 2010-04-21
2楼  发表于: 2010-01-20 10:48

 回 1楼(kasim) 的帖子

小弟是新手,多谢斑竹指教。
战略很重要
级别: 侠客
UID: 12425
精华: 0
发帖: 60
金钱: 300 两
威望: 60 点
综合积分: 120 分
注册时间: 2010-01-06
最后登录: 2011-09-05
3楼  发表于: 2010-01-23 13:39
我也一直对这个问题有疑问...
2440
级别: 侠客
UID: 34266
精华: 0
发帖: 68
金钱: 350 两
威望: 70 点
综合积分: 136 分
注册时间: 2010-12-13
最后登录: 2015-07-01
4楼  发表于: 2011-09-09 11:58
mark