Commit de385f7c authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 05-get_tuple_data.diff

Add a wrapping around pcmcia_get_tuple_data, and use
pccard_get_tuple_data wherever possible.
parent 5c06a281
......@@ -588,15 +588,12 @@ EXPORT_SYMBOL(pccard_get_next_tuple);
#define _MIN(a, b) (((a) < (b)) ? (a) : (b))
int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple)
{
struct pcmcia_socket *s;
u_int len;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
if (!s)
return CS_BAD_HANDLE;
if (tuple->TupleLink < tuple->TupleOffset)
return CS_NO_MORE_ITEMS;
......@@ -609,6 +606,8 @@ int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
_MIN(len, tuple->TupleDataMax), tuple->TupleData);
return CS_SUCCESS;
}
EXPORT_SYMBOL(pccard_get_tuple_data);
/*======================================================================
......@@ -1520,3 +1519,14 @@ int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
return pccard_get_next_tuple(s, handle->Function, tuple);
}
EXPORT_SYMBOL(pcmcia_get_next_tuple);
int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_tuple_data(s, tuple);
}
EXPORT_SYMBOL(pcmcia_get_tuple_data);
......@@ -2106,7 +2106,6 @@ EXPORT_SYMBOL(pcmcia_get_mem_page);
EXPORT_SYMBOL(pcmcia_get_first_window);
EXPORT_SYMBOL(pcmcia_get_next_window);
EXPORT_SYMBOL(pcmcia_get_status);
EXPORT_SYMBOL(pcmcia_get_tuple_data);
EXPORT_SYMBOL(pcmcia_insert_card);
EXPORT_SYMBOL(pcmcia_map_mem_page);
EXPORT_SYMBOL(pcmcia_modify_configuration);
......
......@@ -952,7 +952,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
case DS_GET_TUPLE_DATA:
buf.tuple.TupleData = buf.tuple_parse.data;
buf.tuple.TupleDataMax = sizeof(buf.tuple_parse.data);
ret = pcmcia_get_tuple_data(s->handle, &buf.tuple);
ret = pccard_get_tuple_data(s->parent, &buf.tuple);
break;
case DS_PARSE_TUPLE:
buf.tuple.TupleData = buf.tuple_parse.data;
......
......@@ -609,7 +609,9 @@ 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_replace_cis(struct pcmcia_socket *s, cisdump_t *cis);
/* don't use outside of PCMCIA core yet */
int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int func, tuple_t *tuple);
int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple);
int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple);
#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