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
Kirill Smelkov
linux
Commits
31d6168a
Commit
31d6168a
authored
Oct 09, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] ecard.c: pass a function pointer for kecardd
parent
74db1a37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
25 deletions
+6
-25
arch/arm/kernel/ecard.c
arch/arm/kernel/ecard.c
+6
-25
No files found.
arch/arm/kernel/ecard.c
View file @
31d6168a
...
...
@@ -54,13 +54,8 @@
#define HAVE_EXPMASK
#endif
enum
req
{
req_readbytes
,
req_reset
};
struct
ecard_request
{
enum
req
req
;
void
(
*
fn
)(
struct
ecard_request
*
)
;
ecard_t
*
ec
;
unsigned
int
address
;
unsigned
int
length
;
...
...
@@ -131,15 +126,14 @@ slot_to_ecard(unsigned int slot)
#define POD_INT_ADDR(x) ((volatile unsigned char *)\
((BUS_ADDR((x)) - IO_BASE) + IO_START))
static
inline
void
ecard_task_reset
(
struct
ecard_request
*
req
)
static
void
ecard_task_reset
(
struct
ecard_request
*
req
)
{
struct
expansion_card
*
ec
=
req
->
ec
;
if
(
ec
->
loader
)
ecard_loader_reset
(
POD_INT_ADDR
(
ec
->
podaddr
),
ec
->
loader
);
}
static
void
ecard_task_readbytes
(
struct
ecard_request
*
req
)
static
void
ecard_task_readbytes
(
struct
ecard_request
*
req
)
{
unsigned
char
*
buf
=
(
unsigned
char
*
)
req
->
buffer
;
volatile
unsigned
char
*
base_addr
=
...
...
@@ -208,19 +202,6 @@ ecard_task_readbytes(struct ecard_request *req)
}
static
void
ecard_do_request
(
struct
ecard_request
*
req
)
{
switch
(
req
->
req
)
{
case
req_readbytes
:
ecard_task_readbytes
(
req
);
break
;
case
req_reset
:
ecard_task_reset
(
req
);
break
;
}
}
static
DECLARE_WAIT_QUEUE_HEAD
(
ecard_wait
);
static
struct
ecard_request
*
ecard_req
;
static
DECLARE_MUTEX
(
ecard_sem
);
...
...
@@ -298,7 +279,7 @@ ecard_task(void * unused)
req
=
xchg
(
&
ecard_req
,
NULL
);
if
(
req
!=
NULL
)
{
ecard_do_request
(
req
);
req
->
fn
(
req
);
complete
(
req
->
complete
);
}
}
...
...
@@ -340,7 +321,7 @@ ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld)
{
struct
ecard_request
req
;
req
.
req
=
req
_readbytes
;
req
.
fn
=
ecard_task
_readbytes
;
req
.
ec
=
ec
;
req
.
address
=
off
;
req
.
length
=
len
;
...
...
@@ -1150,7 +1131,7 @@ static void ecard_drv_shutdown(struct device *dev)
if
(
drv
->
shutdown
)
drv
->
shutdown
(
ec
);
ecard_release
(
ec
);
req
.
req
=
req
_reset
;
req
.
fn
=
ecard_task
_reset
;
req
.
ec
=
ec
;
ecard_call
(
&
req
);
}
...
...
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