'CS-SUCCESS' and other special error codes are gone.
'pcmcia_parse_tuple()' now has two arguments, not three.
tuple.TupleDataMax = 255;
tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
- if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
- (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) {
+ if ((pcmcia_get_first_tuple(link, &tuple) == 0) &&
+ (pcmcia_get_tuple_data(link, &tuple) == 0)) {
prodid = le16_to_cpu(buf[1]);
}
if ((last_ret = pcmcia_get_tuple_data(link, &tuple)) != 0)
goto cs_failed;
last_fn = ParseTuple;
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse)) != 0)
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse)) != 0)
goto cs_failed;
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if (pcmcia_get_tuple_data(link, &tuple))
goto next_entry;
- if (pcmcia_parse_tuple(link, &tuple, &parse))
+ if (pcmcia_parse_tuple(&tuple, &parse))
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
if ((last_ret = pcmcia_get_tuple_data(link, &tuple)) != 0)
goto cs_failed;
last_fn = ParseTuple;
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse)) != 0)
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse)) != 0)
goto cs_failed;
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if ((last_ret = pcmcia_get_tuple_data(link, &tuple)) != 0)
goto next_entry;
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse)) != 0)
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse)) != 0)
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
cs_error(link, GetTupleData, last_ret);
goto cs_failed;
}
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse)) != 0) {
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse)) != 0) {
cs_error(link, ParseTuple, last_ret);
goto cs_failed;
}
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if (pcmcia_get_tuple_data(link, &tuple) != 0)
goto next_entry;
- if (pcmcia_parse_tuple(link, &tuple, &parse) != 0)
+ if (pcmcia_parse_tuple(&tuple, &parse) != 0)
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
cs_error(link, GetTupleData, last_ret);
goto cs_failed;
}
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse)) != 0) {
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse)) != 0) {
cs_error(link, ParseTuple, last_ret);
goto cs_failed;
}
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if (pcmcia_get_tuple_data(link, &tuple) != 0)
goto next_entry;
- if (pcmcia_parse_tuple(link, &tuple, &parse) != 0)
+ if (pcmcia_parse_tuple(&tuple, &parse) != 0)
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
cs_error(link, GetTupleData, last_ret);
goto cs_failed;
}
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse))) {
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse))) {
cs_error(link, ParseTuple, last_ret);
goto cs_failed;
}
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if (pcmcia_get_tuple_data(link, &tuple))
goto next_entry;
- if (pcmcia_parse_tuple(link, &tuple, &parse))
+ if (pcmcia_parse_tuple(&tuple, &parse))
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
tuple.DesiredTuple = CISTPL_CONFIG;
ret = pcmcia_get_first_tuple(link, &tuple);
ret = pcmcia_get_tuple_data(link, &tuple);
- ret = pcmcia_parse_tuple(link, &tuple, &parse);
+ ret = pcmcia_parse_tuple(&tuple, &parse);
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
#if 0
tuple.DesiredTuple = CISTPL_LONGLINK_MFC;
tuple.Attributes = TUPLE_RETURN_COMMON | TUPLE_RETURN_LINK;
- info->multi(first_tuple(link, &tuple, &parse) == CS_SUCCESS);
+ info->multi(first_tuple(link, &tuple, &parse) == 0);
#endif
tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
- if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
- (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) {
+ if ((pcmcia_get_first_tuple(link, &tuple) == 0) &&
+ (pcmcia_get_tuple_data(link, &tuple) == 0)) {
manfid = le16_to_cpu(buf[0]);
prodid = le16_to_cpu(buf[1]);
}
tuple.Attributes = 0;
ret = pcmcia_get_first_tuple(link, &tuple);
ret = pcmcia_get_tuple_data(link, &tuple);
- ret = pcmcia_parse_tuple(link, &tuple, &parse);
+ ret = pcmcia_parse_tuple(&tuple, &parse);
#if 0
printk(" index: 0x%x\n", parse.cftable_entry.index);
tuple.TupleDataMax = 255;
tuple.DesiredTuple = CISTPL_MANFID;
tuple.Attributes = TUPLE_RETURN_COMMON;
- if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) &&
- (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) {
+ if ((pcmcia_get_first_tuple(link, &tuple) == 0) &&
+ (pcmcia_get_tuple_data(link, &tuple) == 0)) {
prodid = le16_to_cpu(buf[1]);
}
cs_error(link, GetTupleData, last_ret);
goto cs_failed;
}
- if ((last_ret = pcmcia_parse_tuple(link, &tuple, &parse))) {
+ if ((last_ret = pcmcia_parse_tuple(&tuple, &parse))) {
cs_error(link, ParseTuple, last_ret);
goto cs_failed;
}
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
if (pcmcia_get_tuple_data(link, &tuple))
goto next_entry;
- if (pcmcia_parse_tuple(link, &tuple, &parse))
+ if (pcmcia_parse_tuple(&tuple, &parse))
goto next_entry;
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
-noinst_HEADERS=ds.h
+noinst_HEADERS=ds.h cistpl.h
--- /dev/null
+/*
+ * pcmcia/cistpl.h compatibility header
+ */
+
+#ifndef __COMPAT_PCMCIA_CISTPL_H_
+#define __COMPAT_PCMCIA_CISTPL_H_
+
+#include_next <pcmcia/cistpl.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+
+/* Redefine pcmcia_parse_tuple() macro to have only 2 params, like 2.6.28. */
+#undef pcmcia_parse_tuple
+#define pcmcia_parse_tuple(tuple, parse) pccard_parse_tuple(tuple, parse)
+
+#endif
+
+#endif // __COMPAT_PCMCIA_CISTPL_H_