pcmcia: pccard_read_tuple and TUPLE_RETURN_COMMON cleanup
pccard_read_tuple(), which is only used by the PCMCIA core, should handle TUPLE_RETURN_COMMON more sensibly: If a specific function (which may be 0) is requested, set tuple.Attributes = 0 as was done in all PCMCIA drivers. If, however, BIND_FN_ALL is requested, return the "common" tuple. As to the callers of pccard_read_tuple(): - All calls to pcmcia_validate_cis() had set the "function" parameter to BIND_FN_ALL. Therefore, remove the "function" parameter and make the parameter to pccard_read_tuple explicit. - Calls to CISTPL_VERS_1 and CISTPL_MANFID now set BIND_FN_ALL. This was already the case for calls to CISTPL_LONGLINK_MFC. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
@@ -197,8 +197,7 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function,
|
||||
cisdata_t code, void *parse);
|
||||
int pcmcia_replace_cis(struct pcmcia_socket *s,
|
||||
const u8 *data, const size_t len);
|
||||
int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function,
|
||||
unsigned int *count);
|
||||
int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *count);
|
||||
|
||||
/* rsrc_mgr.c */
|
||||
int pcmcia_validate_mem(struct pcmcia_socket *s);
|
||||
|
Reference in New Issue
Block a user