Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
[safe/jmp/linux-2.6] / drivers / pcmcia / pcmcia_resource.c
index de13c42..d919e96 100644 (file)
@@ -29,7 +29,6 @@
 #include <pcmcia/ds.h>
 
 #include "cs_internal.h"
-#include "ds_internal.h"
 
 
 /* Access speed for IO windows */
@@ -303,9 +302,10 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
        /* We only allow changing Vpp1 and Vpp2 to the same value */
        if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) &&
            (mod->Attributes & CONF_VPP2_CHANGE_VALID)) {
-               if (mod->Vpp1 != mod->Vpp2)
+               if (mod->Vpp1 != mod->Vpp2) {
                        ds_dbg(s, 0, "Vpp1 and Vpp2 must be the same\n");
                        return -EINVAL;
+               }
                s->socket.Vpp = mod->Vpp1;
                if (s->ops->set_socket(s, &s->socket)) {
                        dev_printk(KERN_WARNING, &s->dev,
@@ -489,7 +489,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
        pccard_io_map iomap;
 
        if (!(s->state & SOCKET_PRESENT))
-               return -ENODEV;;
+               return -ENODEV;
 
        if (req->IntType & INT_CARDBUS) {
                ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n");
@@ -694,8 +694,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
        type = 0;
        if (s->functions > 1)           /* All of this ought to be handled higher up */
                type = IRQF_SHARED;
-       if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)
+       else if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)
                type = IRQF_SHARED;
+       else printk(KERN_WARNING "pcmcia: Driver needs updating to support IRQ sharing.\n");
 
 #ifdef CONFIG_PCMCIA_PROBE
 
@@ -901,7 +902,7 @@ struct pcmcia_cfg_mem {
  *
  * pcmcia_loop_config() loops over all configuration options, and calls
  * the driver-specific conf_check() for each one, checking whether
- * it is a valid one.
+ * it is a valid one. Returns 0 on success or errorcode otherwise.
  */
 int pcmcia_loop_config(struct pcmcia_device *p_dev,
                       int      (*conf_check)   (struct pcmcia_device *p_dev,
@@ -914,7 +915,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
        struct pcmcia_cfg_mem *cfg_mem;
 
        tuple_t *tuple;
-       int ret = -ENODEV;
+       int ret;
        unsigned int vcc;
 
        cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL);
@@ -938,7 +939,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
                if (pcmcia_get_tuple_data(p_dev, tuple))
                        goto next_entry;
 
-               if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse))
+               if (pcmcia_parse_tuple(tuple, &cfg_mem->parse))
                        goto next_entry;
 
                /* default values */