diff options
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 1cf7d54fb7e2..a8bf8c1b45ed 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -383,8 +383,8 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
383 | s->irq.AssignedIRQ = 0; | 383 | s->irq.AssignedIRQ = 0; |
384 | } | 384 | } |
385 | 385 | ||
386 | if (req->Attributes & IRQ_HANDLE_PRESENT) { | 386 | if (req->Handler) { |
387 | free_irq(req->AssignedIRQ, req->Instance); | 387 | free_irq(req->AssignedIRQ, p_dev->priv); |
388 | } | 388 | } |
389 | 389 | ||
390 | #ifdef CONFIG_PCMCIA_PROBE | 390 | #ifdef CONFIG_PCMCIA_PROBE |
@@ -664,7 +664,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
664 | /* if the underlying IRQ infrastructure allows for it, only allocate | 664 | /* if the underlying IRQ infrastructure allows for it, only allocate |
665 | * the IRQ, but do not enable it | 665 | * the IRQ, but do not enable it |
666 | */ | 666 | */ |
667 | if (!(req->Attributes & IRQ_HANDLE_PRESENT)) | 667 | if (!(req->Handler)) |
668 | type |= IRQ_NOAUTOEN; | 668 | type |= IRQ_NOAUTOEN; |
669 | #endif /* IRQ_NOAUTOEN */ | 669 | #endif /* IRQ_NOAUTOEN */ |
670 | 670 | ||
@@ -674,7 +674,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
674 | } else { | 674 | } else { |
675 | int try; | 675 | int try; |
676 | u32 mask = s->irq_mask; | 676 | u32 mask = s->irq_mask; |
677 | void *data = &p_dev->dev.driver; /* something unique to this device */ | 677 | void *data = p_dev; /* something unique to this device */ |
678 | 678 | ||
679 | for (try = 0; try < 64; try++) { | 679 | for (try = 0; try < 64; try++) { |
680 | irq = try % 32; | 680 | irq = try % 32; |
@@ -691,12 +691,12 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
691 | * registering a dummy handle works, i.e. if the IRQ isn't | 691 | * registering a dummy handle works, i.e. if the IRQ isn't |
692 | * marked as used by the kernel resource management core */ | 692 | * marked as used by the kernel resource management core */ |
693 | ret = request_irq(irq, | 693 | ret = request_irq(irq, |
694 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, | 694 | (req->Handler) ? req->Handler : test_action, |
695 | type, | 695 | type, |
696 | p_dev->devname, | 696 | p_dev->devname, |
697 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); | 697 | (req->Handler) ? p_dev->priv : data); |
698 | if (!ret) { | 698 | if (!ret) { |
699 | if (!(req->Attributes & IRQ_HANDLE_PRESENT)) | 699 | if (!req->Handler) |
700 | free_irq(irq, data); | 700 | free_irq(irq, data); |
701 | break; | 701 | break; |
702 | } | 702 | } |
@@ -713,9 +713,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
713 | irq = s->pci_irq; | 713 | irq = s->pci_irq; |
714 | } | 714 | } |
715 | 715 | ||
716 | if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) { | 716 | if (ret && req->Handler) { |
717 | ret = request_irq(irq, req->Handler, type, | 717 | ret = request_irq(irq, req->Handler, type, |
718 | p_dev->devname, req->Instance); | 718 | p_dev->devname, p_dev->priv); |
719 | if (ret) { | 719 | if (ret) { |
720 | dev_printk(KERN_INFO, &s->dev, | 720 | dev_printk(KERN_INFO, &s->dev, |
721 | "request_irq() failed\n"); | 721 | "request_irq() failed\n"); |