Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb14120f authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

pcmcia: re-work pcmcia_request_irq()



Instead of the old pcmcia_request_irq() interface, drivers may now
choose between:

- calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

- use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
  clean up automatically on calls to pcmcia_disable_device() or
  device ejection.

- drivers still not capable of IRQF_SHARED (or not telling us so) may
  use the deprecated pcmcia_request_exclusive_irq() for the time
  being; they might receive a shared IRQ nonetheless.

CC: linux-bluetooth@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-usb@vger.kernel.org
CC: linux-ide@vger.kernel.org
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent a7debe78
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
This file details changes in 2.6 which affect PCMCIA card driver authors:
* New IRQ request rules (as of 2.6.35)
   Instead of the old pcmcia_request_irq() interface, drivers may now
   choose between:
   - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.
   - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
     clean up automatically on calls to pcmcia_disable_device() or
     device ejection.
   - drivers still not capable of IRQF_SHARED (or not telling us so) may
     use the deprecated pcmcia_request_exclusive_irq() for the time
     being; they might receive a shared IRQ nonetheless.

* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
   Instead of the cs_error() callback or the CS_CHECK() macro, please use
+2 −4
Original line number Diff line number Diff line
@@ -268,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
	pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
	pdev->io.IOAddrLines = 3;
	pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
	pdev->conf.Attributes = CONF_ENABLE_IRQ;
	pdev->conf.IntType = INT_MEMORY_AND_IO;

@@ -293,8 +292,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	}
	io_base = pdev->io.BasePort1;
	ctl_base = stk->ctl_base;
	ret = pcmcia_request_irq(pdev, &pdev->irq);
	if (ret)
	if (!pdev->irq)
		goto failed;

	ret = pcmcia_request_configuration(pdev, &pdev->conf);
@@ -344,7 +342,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	}

	/* activate */
	ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_sff_interrupt,
	ret = ata_host_activate(host, pdev->irq, ata_sff_interrupt,
				IRQF_SHARED, &pcmcia_sht);
	if (ret)
		goto failed;
+2 −5
Original line number Diff line number Diff line
@@ -869,9 +869,6 @@ static int bluecard_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = bluecard_interrupt;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -908,9 +905,9 @@ static int bluecard_config(struct pcmcia_device *link)
	if (i != 0)
		goto failed;

	i = pcmcia_request_irq(link, &link->irq);
	i = pcmcia_request_irq(link, bluecard_interrupt);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
		goto failed;

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0)
+2 −5
Original line number Diff line number Diff line
@@ -661,9 +661,6 @@ static int bt3c_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = bt3c_interrupt;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -743,9 +740,9 @@ static int bt3c_config(struct pcmcia_device *link)
	goto failed;

found_port:
	i = pcmcia_request_irq(link, &link->irq);
	i = pcmcia_request_irq(link, &bt3c_interrupt);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
		goto failed;

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0)
+2 −5
Original line number Diff line number Diff line
@@ -590,9 +590,6 @@ static int btuart_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = btuart_interrupt;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -672,9 +669,9 @@ static int btuart_config(struct pcmcia_device *link)
	goto failed;

found_port:
	i = pcmcia_request_irq(link, &link->irq);
	i = pcmcia_request_irq(link, btuart_interrupt);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
		goto failed;

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0)
Loading