fix module unregister function
git-svn-id: svn+ssh://en.codiert.org/home/staff/ben/dev/misc.svn/projects/fpgafs@352 766a2236-cff9-0310-b0c0-a81a5f92509a
This commit is contained in:
parent
37bc27371a
commit
b80cd00633
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
static int fpgafs_send_data_dbg(unsigned char *buf, int len)
|
static int fpgafs_send_data_dbg(unsigned char *buf, int len)
|
||||||
{
|
{
|
||||||
printk("fpgafs: send data CHAM\n");
|
printk("fpgafs: send data DEBUG\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fpgafs_recv_data_dbg(unsigned char *buf, int len)
|
static int fpgafs_recv_data_dbg(unsigned char *buf, int len)
|
||||||
{
|
{
|
||||||
printk("fpgafs: receive data CHAM\n");
|
printk("fpgafs: receive data DEBUG\n");
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
llmgmt.c
8
llmgmt.c
@ -60,12 +60,16 @@ int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv)
|
|||||||
|
|
||||||
spin_lock_irqsave(&fpgafs_lldrv_lock, flags);
|
spin_lock_irqsave(&fpgafs_lldrv_lock, flags);
|
||||||
|
|
||||||
|
for(i=0; i < FPGAFS_MAX_LLDRV; i++) {
|
||||||
|
if (lldrv[i] == drv) {
|
||||||
|
|
||||||
|
/* call the exit function */
|
||||||
if (lldrv[lldrv_count]->exit)
|
if (lldrv[lldrv_count]->exit)
|
||||||
lldrv[lldrv_count]->exit();
|
lldrv[lldrv_count]->exit();
|
||||||
|
|
||||||
for(i=0; i < FPGAFS_MAX_LLDRV; i++) {
|
|
||||||
if (lldrv[i] == drv) {
|
|
||||||
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) {
|
||||||
for(k=0; k < FPGAFS_MAX_LLDRV; k++)
|
for(k=0; k < FPGAFS_MAX_LLDRV; k++)
|
||||||
|
Loading…
Reference in New Issue
Block a user