]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pcmcia/pcmcia_resource.c
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / pcmcia / pcmcia_resource.c
index 50468543d6077ea583667484a240e25f853de985..a8bf8c1b45ede688ab3613eeaf570356d0baa795 100644 (file)
@@ -383,8 +383,8 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
                s->irq.AssignedIRQ = 0;
        }
 
-       if (req->Attributes & IRQ_HANDLE_PRESENT) {
-               free_irq(req->AssignedIRQ, req->Instance);
+       if (req->Handler) {
+               free_irq(req->AssignedIRQ, p_dev->priv);
        }
 
 #ifdef CONFIG_PCMCIA_PROBE
@@ -664,7 +664,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
        /* if the underlying IRQ infrastructure allows for it, only allocate
         * the IRQ, but do not enable it
         */
-       if (!(req->Attributes & IRQ_HANDLE_PRESENT))
+       if (!(req->Handler))
                type |= IRQ_NOAUTOEN;
 #endif /* IRQ_NOAUTOEN */
 
@@ -674,7 +674,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
        } else {
                int try;
                u32 mask = s->irq_mask;
-               void *data = &p_dev->dev.driver; /* something unique to this device */
+               void *data = p_dev; /* something unique to this device */
 
                for (try = 0; try < 64; try++) {
                        irq = try % 32;
@@ -691,12 +691,12 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
                         * registering a dummy handle works, i.e. if the IRQ isn't
                         * marked as used by the kernel resource management core */
                        ret = request_irq(irq,
-                                         (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action,
+                                         (req->Handler) ? req->Handler : test_action,
                                          type,
                                          p_dev->devname,
-                                         (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data);
+                                         (req->Handler) ? p_dev->priv : data);
                        if (!ret) {
-                               if (!(req->Attributes & IRQ_HANDLE_PRESENT))
+                               if (!req->Handler)
                                        free_irq(irq, data);
                                break;
                        }
@@ -713,9 +713,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
                irq = s->pci_irq;
        }
 
-       if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) {
+       if (ret && req->Handler) {
                ret = request_irq(irq, req->Handler, type,
-                                 p_dev->devname, req->Instance);
+                                 p_dev->devname, p_dev->priv);
                if (ret) {
                        dev_printk(KERN_INFO, &s->dev,
                                "request_irq() failed\n");
@@ -752,9 +752,9 @@ EXPORT_SYMBOL(pcmcia_request_irq);
  * Request_window() establishes a mapping between card memory space
  * and system memory space.
  */
-int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh)
+int pcmcia_request_window(struct pcmcia_device *p_dev, win_req_t *req, window_handle_t *wh)
 {
-       struct pcmcia_socket *s = (*p_dev)->socket;
+       struct pcmcia_socket *s = p_dev->socket;
        pccard_mem_map *win;
        u_long align;
        int w;
@@ -804,7 +804,7 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
                        return -EINVAL;
                }
        }
-       (*p_dev)->_win |= CLIENT_WIN_REQ(w);
+       p_dev->_win |= CLIENT_WIN_REQ(w);
 
        /* Configure the socket controller */
        win->map = w+1;