Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
198b38b3
Commit
198b38b3
authored
Oct 15, 2003
by
Armin Schindler
Committed by
Linus Torvalds
Oct 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Eicon ISDN driver: use work_struct instead of tasklet for dpc.
parent
f6e3ca00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
drivers/isdn/hardware/eicon/divasmain.c
drivers/isdn/hardware/eicon/divasmain.c
+8
-17
No files found.
drivers/isdn/hardware/eicon/divasmain.c
View file @
198b38b3
/* $Id: divasmain.c,v 1.4
3 2003/09/22 08:57:31 schindler
Exp $
/* $Id: divasmain.c,v 1.4
6 2003/10/10 12:28:14 armin
Exp $
*
*
* Low level driver for Eicon DIVA Server ISDN cards.
* Low level driver for Eicon DIVA Server ISDN cards.
*
*
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#include "diva_dma.h"
#include "diva_dma.h"
#include "diva_pci.h"
#include "diva_pci.h"
static
char
*
main_revision
=
"$Revision: 1.4
3
$"
;
static
char
*
main_revision
=
"$Revision: 1.4
6
$"
;
static
int
major
;
static
int
major
;
...
@@ -69,7 +69,7 @@ extern int divasfunc_init(int dbgmask);
...
@@ -69,7 +69,7 @@ extern int divasfunc_init(int dbgmask);
extern
void
divasfunc_exit
(
void
);
extern
void
divasfunc_exit
(
void
);
typedef
struct
_diva_os_thread_dpc
{
typedef
struct
_diva_os_thread_dpc
{
struct
tasklet
_struct
divas_task
;
struct
work
_struct
divas_task
;
struct
work_struct
trap_script_task
;
struct
work_struct
trap_script_task
;
diva_os_soft_isr_t
*
psoft_isr
;
diva_os_soft_isr_t
*
psoft_isr
;
int
card_failed
;
int
card_failed
;
...
@@ -552,7 +552,7 @@ void diva_os_remove_irq(void *context, byte irq)
...
@@ -552,7 +552,7 @@ void diva_os_remove_irq(void *context, byte irq)
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
DPC framework implementation
DPC framework implementation
-------------------------------------------------------------------------- */
-------------------------------------------------------------------------- */
static
void
diva_os_dpc_proc
(
unsigned
long
context
)
static
void
diva_os_dpc_proc
(
void
*
context
)
{
{
diva_os_thread_dpc_t
*
psoft_isr
=
(
diva_os_thread_dpc_t
*
)
context
;
diva_os_thread_dpc_t
*
psoft_isr
=
(
diva_os_thread_dpc_t
*
)
context
;
diva_os_soft_isr_t
*
pisr
=
psoft_isr
->
psoft_isr
;
diva_os_soft_isr_t
*
pisr
=
psoft_isr
->
psoft_isr
;
...
@@ -575,8 +575,7 @@ int diva_os_initialize_soft_isr(diva_os_soft_isr_t * psoft_isr,
...
@@ -575,8 +575,7 @@ int diva_os_initialize_soft_isr(diva_os_soft_isr_t * psoft_isr,
psoft_isr
->
callback_context
=
callback_context
;
psoft_isr
->
callback_context
=
callback_context
;
pdpc
->
psoft_isr
=
psoft_isr
;
pdpc
->
psoft_isr
=
psoft_isr
;
INIT_WORK
(
&
pdpc
->
trap_script_task
,
diva_adapter_trapped
,
pdpc
);
INIT_WORK
(
&
pdpc
->
trap_script_task
,
diva_adapter_trapped
,
pdpc
);
tasklet_init
(
&
pdpc
->
divas_task
,
diva_os_dpc_proc
,
INIT_WORK
(
&
pdpc
->
divas_task
,
diva_os_dpc_proc
,
pdpc
);
(
unsigned
long
)
pdpc
);
return
(
0
);
return
(
0
);
}
}
...
@@ -587,7 +586,7 @@ int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
...
@@ -587,7 +586,7 @@ int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
diva_os_thread_dpc_t
*
pdpc
=
diva_os_thread_dpc_t
*
pdpc
=
(
diva_os_thread_dpc_t
*
)
psoft_isr
->
object
;
(
diva_os_thread_dpc_t
*
)
psoft_isr
->
object
;
tasklet_schedule
(
&
pdpc
->
divas_task
);
schedule_work
(
&
pdpc
->
divas_task
);
}
}
return
(
1
);
return
(
1
);
...
@@ -595,26 +594,18 @@ int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
...
@@ -595,26 +594,18 @@ int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
int
diva_os_cancel_soft_isr
(
diva_os_soft_isr_t
*
psoft_isr
)
int
diva_os_cancel_soft_isr
(
diva_os_soft_isr_t
*
psoft_isr
)
{
{
if
(
psoft_isr
&&
psoft_isr
->
object
)
{
flush_scheduled_work
();
diva_os_thread_dpc_t
*
pdpc
=
(
diva_os_thread_dpc_t
*
)
psoft_isr
->
object
;
tasklet_kill
(
&
pdpc
->
divas_task
);
}
return
(
0
);
return
(
0
);
}
}
void
diva_os_remove_soft_isr
(
diva_os_soft_isr_t
*
psoft_isr
)
void
diva_os_remove_soft_isr
(
diva_os_soft_isr_t
*
psoft_isr
)
{
{
if
(
psoft_isr
&&
psoft_isr
->
object
)
{
if
(
psoft_isr
&&
psoft_isr
->
object
)
{
diva_os_thread_dpc_t
*
pdpc
=
(
diva_os_thread_dpc_t
*
)
psoft_isr
->
object
;
void
*
mem
;
void
*
mem
;
tasklet_kill
(
&
pdpc
->
divas_task
);
flush_scheduled_work
();
mem
=
psoft_isr
->
object
;
mem
=
psoft_isr
->
object
;
psoft_isr
->
object
=
0
;
psoft_isr
->
object
=
0
;
flush_scheduled_work
();
diva_os_free
(
0
,
mem
);
diva_os_free
(
0
,
mem
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment