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
69b21a60
Commit
69b21a60
authored
Oct 19, 2004
by
Dominik Brodowski
Committed by
Russell King
Oct 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PCMCIA] 13-get_status.diff
Add a wrapper around pcmcia_get_status, and use pccard_get_status in ds.c
parent
7bd760e6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
drivers/pcmcia/cs.c
drivers/pcmcia/cs.c
+3
-13
drivers/pcmcia/cs_internal.h
drivers/pcmcia/cs_internal.h
+1
-0
drivers/pcmcia/ds.c
drivers/pcmcia/ds.c
+5
-1
drivers/pcmcia/pcmcia_compat.c
drivers/pcmcia/pcmcia_compat.c
+10
-0
No files found.
drivers/pcmcia/cs.c
View file @
69b21a60
...
...
@@ -1121,15 +1121,11 @@ EXPORT_SYMBOL(pcmcia_lookup_bus);
======================================================================*/
int
pc
mcia_get_status
(
client_handle_t
handle
,
cs_status_t
*
status
)
int
pc
card_get_status
(
struct
pcmcia_socket
*
s
,
unsigned
int
function
,
cs_status_t
*
status
)
{
struct
pcmcia_socket
*
s
;
config_t
*
c
;
int
val
;
if
(
CHECK_HANDLE
(
handle
))
return
CS_BAD_HANDLE
;
s
=
SOCKET
(
handle
);
s
->
ops
->
get_status
(
s
,
&
val
);
status
->
CardState
=
status
->
SocketState
=
0
;
status
->
CardState
|=
(
val
&
SS_DETECT
)
?
CS_EVENT_CARD_DETECT
:
0
;
...
...
@@ -1141,13 +1137,7 @@ int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
if
(
!
(
s
->
state
&
SOCKET_PRESENT
))
return
CS_NO_CARD
;
/* Get info from the PRR, if necessary */
if
(
handle
->
Function
==
BIND_FN_ALL
)
{
if
(
status
->
Function
&&
(
status
->
Function
>=
s
->
functions
))
return
CS_BAD_ARGS
;
c
=
(
s
->
config
!=
NULL
)
?
&
s
->
config
[
status
->
Function
]
:
NULL
;
}
else
c
=
CONFIG
(
handle
);
c
=
(
s
->
config
!=
NULL
)
?
&
s
->
config
[
function
]
:
NULL
;
if
((
c
!=
NULL
)
&&
(
c
->
state
&
CONFIG_LOCKED
)
&&
(
c
->
IntType
&
(
INT_MEMORY_AND_IO
|
INT_ZOOMED_VIDEO
)))
{
u_char
reg
;
...
...
@@ -1182,6 +1172,7 @@ int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
(
val
&
SS_READY
)
?
CS_EVENT_READY_CHANGE
:
0
;
return
CS_SUCCESS
;
}
/* get_status */
EXPORT_SYMBOL
(
pccard_get_status
);
/*======================================================================
...
...
@@ -2070,7 +2061,6 @@ EXPORT_SYMBOL(pcmcia_deregister_client);
EXPORT_SYMBOL
(
pcmcia_eject_card
);
EXPORT_SYMBOL
(
pcmcia_get_card_services_info
);
EXPORT_SYMBOL
(
pcmcia_get_mem_page
);
EXPORT_SYMBOL
(
pcmcia_get_status
);
EXPORT_SYMBOL
(
pcmcia_insert_card
);
EXPORT_SYMBOL
(
pcmcia_map_mem_page
);
EXPORT_SYMBOL
(
pcmcia_modify_configuration
);
...
...
drivers/pcmcia/cs_internal.h
View file @
69b21a60
...
...
@@ -174,6 +174,7 @@ extern struct list_head pcmcia_socket_list;
int
pcmcia_get_window
(
struct
pcmcia_socket
*
s
,
window_handle_t
*
handle
,
int
idx
,
win_req_t
*
req
);
int
pccard_get_configuration_info
(
struct
pcmcia_socket
*
s
,
unsigned
int
function
,
config_info_t
*
config
);
int
pccard_reset_card
(
struct
pcmcia_socket
*
skt
);
int
pccard_get_status
(
struct
pcmcia_socket
*
s
,
unsigned
int
function
,
cs_status_t
*
status
);
#define cs_socket_name(skt) ((skt)->dev.class_id)
...
...
drivers/pcmcia/ds.c
View file @
69b21a60
...
...
@@ -966,7 +966,11 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret
=
pccard_reset_card
(
s
->
parent
);
break
;
case
DS_GET_STATUS
:
ret
=
pcmcia_get_status
(
s
->
handle
,
&
buf
.
status
);
if
(
buf
.
status
.
Function
&&
(
buf
.
status
.
Function
>=
s
->
parent
->
functions
))
ret
=
CS_BAD_ARGS
;
else
ret
=
pccard_get_status
(
s
->
parent
,
buf
.
status
.
Function
,
&
buf
.
status
);
break
;
case
DS_VALIDATE_CIS
:
pcmcia_validate_mem
(
s
->
parent
);
...
...
drivers/pcmcia/pcmcia_compat.c
View file @
69b21a60
...
...
@@ -102,6 +102,16 @@ int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
}
EXPORT_SYMBOL
(
pcmcia_reset_card
);
int
pcmcia_get_status
(
client_handle_t
handle
,
cs_status_t
*
status
)
{
struct
pcmcia_socket
*
s
;
if
(
CHECK_HANDLE
(
handle
))
return
CS_BAD_HANDLE
;
s
=
SOCKET
(
handle
);
return
pccard_get_status
(
s
,
handle
->
Function
,
status
);
}
EXPORT_SYMBOL
(
pcmcia_get_status
);
#ifdef CONFIG_PCMCIA_OBSOLETE
int
pcmcia_get_first_window
(
window_handle_t
*
win
,
win_req_t
*
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