[PATCH] fix ISA dependencies in pcmcia stuff

From: Paul Mackerras (paulus@linuxcare.com.au)
Date: Sat Sep 02 2000 - 00:43:53 EDT

  • Next message: J. Dow: "Re: thread rant [semi-OT]"

    Linus,

    The patch below adds #ifdef CONFIG_ISA to a couple of places in the
    pcmcia drivers. This patch allows me to use the cardbus slot on my
    Apple powerbook under linux-2.4.0-test8-pre1.

    Regards,
    Paul.

    diff -urN linux/drivers/pcmcia/cardbus.c bk/drivers/pcmcia/cardbus.c
    --- linux/drivers/pcmcia/cardbus.c Wed May 3 18:45:18 2000
    +++ bk/drivers/pcmcia/cardbus.c Tue Aug 22 09:45:16 2000
    @@ -234,6 +234,7 @@
     
     static int cb_assign_irq(u32 mask)
     {
    +#ifdef CONFIG_ISA
             int irq, try;
     
             for (try = 0; try < 2; try++) {
    @@ -244,6 +245,7 @@
                             }
                     }
             }
    +#endif
             return 0;
     }
     
    @@ -369,7 +371,9 @@
     
     void cb_release(socket_info_t * s)
     {
    +#ifdef CONFIG_ISA
             cb_config_t *c = s->cb_config;
    +#endif
     
             DEBUG(0, "cs: cb_release(bus %d)\n", s->cap.cb_dev->subordinate->number);
     
    diff -urN linux/drivers/pcmcia/cs.c bk/drivers/pcmcia/cs.c
    --- linux/drivers/pcmcia/cs.c Thu Aug 24 17:52:07 2000
    +++ bk/drivers/pcmcia/cs.c Fri Aug 25 08:34:48 2000
    @@ -1815,8 +1815,11 @@
     {
         socket_info_t *s;
         config_t *c;
    - int try, ret = 0, irq = 0;
    + int ret = 0, irq = 0;
    +#ifdef CONFIG_ISA
    + int try;
         u_int mask;
    +#endif /* CONFIG_ISA */
         
         if (CHECK_HANDLE(handle))
             return CS_BAD_HANDLE;
    diff -urN linux/drivers/pcmcia/yenta.c bk/drivers/pcmcia/yenta.c
    --- linux/drivers/pcmcia/yenta.c Thu Aug 10 14:06:49 2000
    +++ bk/drivers/pcmcia/yenta.c Tue Aug 22 09:45:16 2000
    @@ -482,6 +482,7 @@
     
     static unsigned int yenta_probe_irq(pci_socket_t *socket, u32 isa_irq_mask)
     {
    +#ifdef CONFIG_ISA
             int i;
             unsigned long val;
             u16 bridge_ctrl;
    @@ -519,6 +520,9 @@
             config_writew(socket, CB_BRIDGE_CONTROL, bridge_ctrl);
     
             return mask;
    +#else
    + return 0;
    +#endif /* CONFIG_ISA */
     }
     
     /*
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Sep 02 2000 - 03:02:06 EDT