]> git.hungrycats.org Git - linux/commitdiff
[PATCH] serial_cs CardServices removal fix
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:29:10 +0000 (18:29 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:29:10 +0000 (18:29 -0800)
From: Russell King <rmk@arm.linux.org.uk>

drivers/serial/serial_cs.c

index 705236631ec84ffea0f1b083c2d2f769fef23845..ba3d16a789f101e506bb2922dbc65b1d017b33a3 100644 (file)
@@ -300,10 +300,10 @@ static int setup_serial(struct serial_info * info, ioaddr_t port, int irq)
 /*====================================================================*/
 
 static int
-get_tuple(int fn, client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
+first_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
 {
        int i;
-       i = CardServices(fn, handle, tuple);
+       i = pcmcia_get_first_tuple(handle, tuple);
        if (i != CS_SUCCESS)
                return CS_NO_MORE_ITEMS;
        i = pcmcia_get_tuple_data(handle, tuple);
@@ -312,8 +312,18 @@ get_tuple(int fn, client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
        return pcmcia_parse_tuple(handle, tuple, parse);
 }
 
-#define first_tuple(a, b, c) get_tuple(GetFirstTuple, a, b, c)
-#define next_tuple(a, b, c) get_tuple(GetNextTuple, a, b, c)
+static int
+next_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
+{
+       int i;
+       i = pcmcia_get_next_tuple(handle, tuple);
+       if (i != CS_SUCCESS)
+               return CS_NO_MORE_ITEMS;
+       i = pcmcia_get_tuple_data(handle, tuple);
+       if (i != CS_SUCCESS)
+               return i;
+       return pcmcia_parse_tuple(handle, tuple, parse);
+}
 
 /*====================================================================*/