|
我编写了个小的驱动,2.4内核的。
加载上去之后发现,init初始化过程没有执行,请教原因
static void spi_drv_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
}
static int spi_drv_open(struct inode* inode, struct file *file)
{
MOD_INC_USE_COUNT;
return 0;
}
static int spi_drv_release(struct inode* inode, struct file *file)
{
MOD_DEC_USE_COUNT;
return 0;
}
static ssize_t spi_drv_read(struct file *filp, int *buffer, size_t count, loff_t *offp)
{
}
static struct file_operations spi_drv_fops =
{
ioctl: spi_drv_ioctl,
open: spi_drv_open,
release: spi_drv_release,
read: spi_drv_read,
};
static int __init spi_drv_init(void)
{
printk("here!\n"); 没有打印
}
static void __exit spi_drv_exit(void)
{
}
module_init(spi_drv_init);
module_exit(spi_drv_exit);
|
|