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:
parent
b80cd00633
commit
c41ddd323f
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
KERNEL_RELEASE = $(shell uname -r)
|
KERNEL_RELEASE = $(shell uname -r)
|
||||||
KERNEL_BUILDROOT ?= /lib/modules/$(KERNEL_RELEASE)/build
|
KERNEL_BUILDROOT ?= /root/linux-2.6.21.5/obj
|
||||||
BUILDROOT = $(shell pwd)
|
BUILDROOT = $(shell pwd)
|
||||||
|
|
||||||
obj-m := fpgafs.o
|
obj-m := fpgafs.o
|
||||||
|
6
llmgmt.c
6
llmgmt.c
@ -64,14 +64,14 @@ int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv)
|
|||||||
if (lldrv[i] == drv) {
|
if (lldrv[i] == drv) {
|
||||||
|
|
||||||
/* call the exit function */
|
/* call the exit function */
|
||||||
if (lldrv[lldrv_count]->exit)
|
if (lldrv[i]->exit)
|
||||||
lldrv[lldrv_count]->exit();
|
lldrv[i]->exit();
|
||||||
|
|
||||||
lldrv[i] = NULL;
|
lldrv[i] = NULL;
|
||||||
lldrv_cur = NULL;
|
|
||||||
|
|
||||||
/* if current, search another low level driver */
|
/* if current, search another low level driver */
|
||||||
if (lldrv_cur == drv) {
|
if (lldrv_cur == drv) {
|
||||||
|
lldrv_cur = NULL;
|
||||||
for(k=0; k < FPGAFS_MAX_LLDRV; k++)
|
for(k=0; k < FPGAFS_MAX_LLDRV; k++)
|
||||||
if (lldrv[k]) {
|
if (lldrv[k]) {
|
||||||
lldrv_cur = lldrv[k];
|
lldrv_cur = lldrv[k];
|
||||||
|
Loading…
Reference in New Issue
Block a user