天嵌 ARM开发社区

 找回密码
 注册
查看: 1235|回复: 2

第一个驱动程序能装载但是不能卸载

[复制链接]
fengc234 发表于 2012-6-30 15:04:26 | 显示全部楼层 |阅读模式
[root@EmbedSky /lib]# insmod EmbedSky_hello.ko

     Hello,EmbedSky!

This is first driver program.

[root@EmbedSky /lib]# rmmod EmbedSky_hello.ko
rmmod: can't unload 'EmbedSky_hello': Device or resource busy
这是为啥?????
 楼主| fengc234 发表于 2012-6-30 17:30:13 | 显示全部楼层
/*************************************

NAME:EmbedSky_hello.c
COPYRIGHT:www.embedsky.net

*************************************/

#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("GPL");               

static int __init EmbedSky_hello_init(void)
{

    printk("<1>\n     Hello,EmbedSky!\n");
    printk("<1>\nThis is first driver program.\n\n");

    return 0;
}

static void __exit EmbedSky_hello_exit(void)
{
    printk("<1>\n     Exit!\n");
    printk("<1>\nGoodbye EmbedSky!\n\n");
}                                    

module_init(EmbedSky_hello_init);
module_exit(EmbedSky_hello_exit);

这是源程序
headforever 发表于 2013-1-10 21:50:23 | 显示全部楼层
同问。
我也遇到同样的问题。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-2 03:01 , Processed in 1.022501 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表