Commit 78a5403f authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 03-replace_cis.diff

pcmcia_replace_cis doesn't need to know about the handle or a sub-
function, as the cis can only be replaced as a whole. Also, remove
bogus entries in cs_internal.h
parent 961a0cda
...@@ -376,12 +376,8 @@ int verify_cis_cache(struct pcmcia_socket *s) ...@@ -376,12 +376,8 @@ int verify_cis_cache(struct pcmcia_socket *s)
======================================================================*/ ======================================================================*/
int pcmcia_replace_cis(client_handle_t handle, cisdump_t *cis) int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis)
{ {
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
if (s->fake_cis != NULL) { if (s->fake_cis != NULL) {
kfree(s->fake_cis); kfree(s->fake_cis);
s->fake_cis = NULL; s->fake_cis = NULL;
......
...@@ -146,13 +146,6 @@ void write_cis_mem(struct pcmcia_socket *s, int attr, ...@@ -146,13 +146,6 @@ void write_cis_mem(struct pcmcia_socket *s, int attr,
void release_cis_mem(struct pcmcia_socket *s); void release_cis_mem(struct pcmcia_socket *s);
void destroy_cis_cache(struct pcmcia_socket *s); void destroy_cis_cache(struct pcmcia_socket *s);
int verify_cis_cache(struct pcmcia_socket *s); int verify_cis_cache(struct pcmcia_socket *s);
void preload_cis_cache(struct pcmcia_socket *s);
int get_first_tuple(client_handle_t handle, tuple_t *tuple);
int get_next_tuple(client_handle_t handle, tuple_t *tuple);
int get_tuple_data(client_handle_t handle, tuple_t *tuple);
int parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse);
int validate_cis(client_handle_t handle, cisinfo_t *info);
int replace_cis(client_handle_t handle, cisdump_t *cis);
int read_tuple(client_handle_t handle, cisdata_t code, void *parse); int read_tuple(client_handle_t handle, cisdata_t code, void *parse);
/* In bulkmem.c */ /* In bulkmem.c */
......
...@@ -1003,7 +1003,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, ...@@ -1003,7 +1003,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
&buf.win_info.map); &buf.win_info.map);
break; break;
case DS_REPLACE_CIS: case DS_REPLACE_CIS:
ret = pcmcia_replace_cis(s->handle, &buf.cisdump); ret = pcmcia_replace_cis(s->parent, &buf.cisdump);
break; break;
case DS_BIND_REQUEST: case DS_BIND_REQUEST:
if (!capable(CAP_SYS_ADMIN)) return -EPERM; if (!capable(CAP_SYS_ADMIN)) return -EPERM;
......
...@@ -607,6 +607,6 @@ int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple); ...@@ -607,6 +607,6 @@ int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple);
int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse); int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse);
int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info); int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info);
int pcmcia_replace_cis(client_handle_t handle, cisdump_t *cis); int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis);
#endif /* LINUX_CISTPL_H */ #endif /* LINUX_CISTPL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment