![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux驱动 C函数
sdkhy0808
这个作者很懒,什么都没留下…
展开
-
subsys_initcall
int getch(void){struct termios oldt,newt;int ch;if (!isatty(STDIN_FILENO)) {fprintf(stderr, "this problem should be run at a terminal\n");exit(1);}// save terminal settingif(tcgetatt原创 2014-06-30 11:02:37 · 608 阅读 · 0 评论 -
kzalloc与kmalloc的区别
Kzalloc与Kmalloc差异 先看看kernel里的定义:/** * kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kmall转载 2014-07-02 08:33:05 · 1825 阅读 · 0 评论 -
__devexit_p的功能
static struct platform_driver xx_driver = {.driver = {.name = "xxx",.owner = THIS_MODULE,.pm = &dm9000_drv_pm_ops,},.probe = dm9000_probe,.remove = __devexit_p(dm9000_drv_remov原创 2014-07-02 17:57:41 · 939 阅读 · 0 评论 -
get_user,put_user与copy_from_user,copy_to_user
首先,这四个函数都有相同的作用:原创 2014-10-14 21:00:53 · 2118 阅读 · 0 评论