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
c60aeebb
Commit
c60aeebb
authored
Jun 11, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PCMCIA] sa11xx driver now takes pcmcia_socket instead of int socket.
parent
b5ab04dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
drivers/pcmcia/sa11xx_core.c
drivers/pcmcia/sa11xx_core.c
+22
-20
No files found.
drivers/pcmcia/sa11xx_core.c
View file @
c60aeebb
...
...
@@ -69,6 +69,8 @@ static struct sa1100_pcmcia_socket sa1100_pcmcia_socket[SA1100_PCMCIA_MAX_SOCK];
#define PCMCIA_SOCKET(x) (sa1100_pcmcia_socket + (x))
#define to_sa1100_socket(x) container_of(x, struct sa1100_pcmcia_socket, socket)
/*
* sa1100_pcmcia_default_mecr_timing
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...
@@ -226,9 +228,9 @@ sa1100_pcmcia_config_skt(struct sa1100_pcmcia_socket *skt, socket_state_t *state
*
* Returns: 0
*/
static
int
sa1100_pcmcia_sock_init
(
unsigned
int
sock
)
static
int
sa1100_pcmcia_sock_init
(
struct
pcmcia_socket
*
sock
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
DEBUG
(
2
,
"%s(): initializing socket %u
\n
"
,
__FUNCTION__
,
skt
->
nr
);
...
...
@@ -248,9 +250,9 @@ static int sa1100_pcmcia_sock_init(unsigned int sock)
*
* Returns: 0
*/
static
int
sa1100_pcmcia_suspend
(
unsigned
int
sock
)
static
int
sa1100_pcmcia_suspend
(
struct
pcmcia_socket
*
sock
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
int
ret
;
DEBUG
(
2
,
"%s(): suspending socket %u
\n
"
,
__FUNCTION__
,
skt
->
nr
);
...
...
@@ -348,11 +350,11 @@ static irqreturn_t sa1100_pcmcia_interrupt(int irq, void *dev, struct pt_regs *r
* Returns: 0
*/
static
int
sa1100_pcmcia_register_callback
(
unsigned
int
sock
,
sa1100_pcmcia_register_callback
(
struct
pcmcia_socket
*
sock
,
void
(
*
handler
)(
void
*
,
unsigned
int
),
void
*
info
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
if
(
handler
)
{
if
(
!
try_module_get
(
skt
->
ops
->
owner
))
...
...
@@ -392,9 +394,9 @@ sa1100_pcmcia_register_callback(unsigned int sock,
* Return value is irrelevant; the pcmcia subsystem ignores it.
*/
static
int
sa1100_pcmcia_inquire_socket
(
unsigned
int
sock
,
socket_cap_t
*
cap
)
sa1100_pcmcia_inquire_socket
(
struct
pcmcia_socket
*
sock
,
socket_cap_t
*
cap
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
int
ret
=
-
1
;
if
(
skt
)
{
...
...
@@ -430,9 +432,9 @@ sa1100_pcmcia_inquire_socket(unsigned int sock, socket_cap_t *cap)
* Returns: 0
*/
static
int
sa1100_pcmcia_get_status
(
unsigned
int
sock
,
unsigned
int
*
status
)
sa1100_pcmcia_get_status
(
struct
pcmcia_socket
*
sock
,
unsigned
int
*
status
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
skt
->
status
=
sa1100_pcmcia_skt_state
(
skt
);
*
status
=
skt
->
status
;
...
...
@@ -450,9 +452,9 @@ sa1100_pcmcia_get_status(unsigned int sock, unsigned int *status)
* Returns: 0
*/
static
int
sa1100_pcmcia_get_socket
(
unsigned
int
sock
,
socket_state_t
*
state
)
sa1100_pcmcia_get_socket
(
struct
pcmcia_socket
*
sock
,
socket_state_t
*
state
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
DEBUG
(
2
,
"%s() for sock %u
\n
"
,
__FUNCTION__
,
skt
->
nr
);
...
...
@@ -472,9 +474,9 @@ sa1100_pcmcia_get_socket(unsigned int sock, socket_state_t *state)
* Returns: 0
*/
static
int
sa1100_pcmcia_set_socket
(
unsigned
int
sock
,
socket_state_t
*
state
)
sa1100_pcmcia_set_socket
(
struct
pcmcia_socket
*
sock
,
socket_state_t
*
state
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
DEBUG
(
2
,
"%s() for sock %u
\n
"
,
__FUNCTION__
,
skt
->
nr
);
...
...
@@ -508,9 +510,9 @@ sa1100_pcmcia_set_socket(unsigned int sock, socket_state_t *state)
* Returns: 0 on success, -1 on error
*/
static
int
sa1100_pcmcia_set_io_map
(
unsigned
int
sock
,
struct
pccard_io_map
*
map
)
sa1100_pcmcia_set_io_map
(
struct
pcmcia_socket
*
sock
,
struct
pccard_io_map
*
map
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
unsigned
short
speed
=
map
->
speed
;
DEBUG
(
2
,
"%s() for sock %u
\n
"
,
__FUNCTION__
,
skt
->
nr
);
...
...
@@ -564,9 +566,9 @@ sa1100_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map)
* Returns: 0 on success, -1 on error
*/
static
int
sa1100_pcmcia_set_mem_map
(
unsigned
int
sock
,
struct
pccard_mem_map
*
map
)
sa1100_pcmcia_set_mem_map
(
struct
pcmcia_socket
*
sock
,
struct
pccard_mem_map
*
map
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
sock
);
struct
sa1100_pcmcia_socket
*
skt
=
to_sa1100_socket
(
sock
);
struct
resource
*
res
;
unsigned
short
speed
=
map
->
speed
;
...
...
@@ -708,7 +710,7 @@ sa1100_pcmcia_proc_status(char *buf, char **start, off_t pos,
* Returns: 0 on success, -1 on error
*/
static
void
sa1100_pcmcia_proc_setup
(
unsigned
int
sock
,
struct
proc_dir_entry
*
base
)
sa1100_pcmcia_proc_setup
(
struct
pcmcia_socket
*
sock
,
struct
proc_dir_entry
*
base
)
{
struct
proc_dir_entry
*
entry
;
...
...
@@ -717,7 +719,7 @@ sa1100_pcmcia_proc_setup(unsigned int sock, struct proc_dir_entry *base)
return
;
}
entry
->
read_proc
=
sa1100_pcmcia_proc_status
;
entry
->
data
=
PCMCIA_SOCKET
(
sock
);
entry
->
data
=
to_sa1100_socket
(
sock
);
}
#else
#define sa1100_pcmcia_proc_setup NULL
...
...
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