fix the fucking unload issue

git-svn-id: svn+ssh://en.codiert.org/home/staff/ben/dev/misc.svn/projects/fpgafs@353 766a2236-cff9-0310-b0c0-a81a5f92509a
This commit is contained in:
ben 2007-07-09 07:19:12 +00:00
parent b80cd00633
commit c41ddd323f
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
KERNEL_RELEASE = $(shell uname -r)
KERNEL_BUILDROOT ?= /lib/modules/$(KERNEL_RELEASE)/build
KERNEL_BUILDROOT ?= /root/linux-2.6.21.5/obj
BUILDROOT = $(shell pwd)
obj-m := fpgafs.o

View File

@ -64,14 +64,14 @@ int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv)
if (lldrv[i] == drv) {
/* call the exit function */
if (lldrv[lldrv_count]->exit)
lldrv[lldrv_count]->exit();
if (lldrv[i]->exit)
lldrv[i]->exit();
lldrv[i] = NULL;
lldrv_cur = NULL;
/* if current, search another low level driver */
if (lldrv_cur == drv) {
lldrv_cur = NULL;
for(k=0; k < FPGAFS_MAX_LLDRV; k++)
if (lldrv[k]) {
lldrv_cur = lldrv[k];