aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs_internal.h
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-10-18 17:32:33 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-08 12:06:54 -0500
commit91284224da5b15ec6c2b45e10fa5eccd1c92a204 (patch)
treee070902f5119b2eacf79d91cd36de98e3ae8423c /drivers/pcmcia/cs_internal.h
parentaf757923a92e6e9dbfdb6b0264be14c564e1c466 (diff)
pcmcia: add new CIS access helpers
As a replacement to pcmcia_get_{first,next}_tuple() and pcmcia_get_tuple_data(), three new -- and easier to use -- functions are added: - pcmcia_get_tuple() to get the very first CIS entry of one type. - pcmcia_loop_tuple() to loop over all CIS entries of one type. - pcmcia_get_mac_from_cis() to read out the hardware MAC address from CISTPL_FUNCE. Only a handful of drivers need these functions anyway, as most CIS access is already handled by pcmcia_loop_config(), which now shares the same backed (pccard_loop_tuple()) with pcmcia_loop_tuple(). A pcmcia_get_mac_from_cis() bug noted by Komuro <komurojun-mbn@nifty.com> has been fixed in this revision. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs_internal.h')
-rw-r--r--drivers/pcmcia/cs_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 1f4098f1354d..06a14c951e92 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -199,6 +199,13 @@ int pcmcia_replace_cis(struct pcmcia_socket *s,
199 const u8 *data, const size_t len); 199 const u8 *data, const size_t len);
200int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *count); 200int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *count);
201 201
202/* loop over CIS entries */
203int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
204 cisdata_t code, cisparse_t *parse, void *priv_data,
205 int (*loop_tuple) (tuple_t *tuple,
206 cisparse_t *parse,
207 void *priv_data));
208
202/* rsrc_mgr.c */ 209/* rsrc_mgr.c */
203int pcmcia_validate_mem(struct pcmcia_socket *s); 210int pcmcia_validate_mem(struct pcmcia_socket *s);
204struct resource *pcmcia_find_io_region(unsigned long base, 211struct resource *pcmcia_find_io_region(unsigned long base,