From ff10fca5ceacf7bc59636f5ab808e775d1717167 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Fri, 22 Oct 2010 08:46:36 +0200 Subject: [PATCH 1/2] pcmcia: IOCARD is also required for using IRQs Dave Hinds pointed out to me that 37979e1546a7 will break b43 and ray_cs, as IOCARD is not -- as the name would suggest -- only needed for cards using IO ports. Instead, as it re-deines several pins, it is also required for using interrupts. Signed-off-by: Dominik Brodowski --- drivers/pcmcia/pcmcia_resource.c | 4 +++- include/pcmcia/ds.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index a9af0d784426..0bdda5b3ed55 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -514,7 +514,9 @@ int pcmcia_enable_device(struct pcmcia_device *p_dev) } /* Pick memory or I/O card, DMA mode, interrupt */ - if (p_dev->_io) + if (p_dev->_io || flags & CONF_ENABLE_IRQ) + flags |= CONF_ENABLE_IOCARD; + if (flags & CONF_ENABLE_IOCARD) s->socket.flags |= SS_IOCARD; if (flags & CONF_ENABLE_SPKR) { s->socket.flags |= SS_SPKR_ENA; diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index d830c87ff0a7..8479b66c067b 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -259,6 +259,8 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev); #define CONF_ENABLE_SPKR 0x0002 #define CONF_ENABLE_PULSE_IRQ 0x0004 #define CONF_ENABLE_ESR 0x0008 +#define CONF_ENABLE_IOCARD 0x0010 /* auto-enabled if IO resources or IRQ + * (CONF_ENABLE_IRQ) in use */ /* flags used by pcmcia_loop_config() autoconfiguration */ #define CONF_AUTO_CHECK_VCC 0x0100 /* check for matching Vcc? */ From 36845d09b93ff04b1c26c47f2c278dd779462468 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Fri, 22 Oct 2010 18:39:23 +0200 Subject: [PATCH 2/2] pcmcia: fix ni_daq_700 compilation Reported-by: Anca Emanuel Signed-off-by: Dominik Brodowski --- drivers/staging/comedi/drivers/ni_daq_700.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index fc772a8a55c6..6b7372eed90d 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -496,7 +496,6 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev, static void dio700_config(struct pcmcia_device *link) { - win_req_t req; int ret; printk(KERN_INFO "ni_daq_700: cs-config\n");