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

Commit 54291263 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (29 commits)
  pcmcia: disable PCMCIA ioctl also for ARM
  drivers/staging/comedi: dev_node removal (quatech_daqp_cs)
  drivers/staging/comedi: dev_node removal (ni_mio_cs)
  drivers/staging/comedi: dev_node removal (ni_labpc_cs)
  drivers/staging/comedi: dev_node removal (ni_daq_dio24)
  drivers/staging/comedi: dev_node removal (ni_daq_700)
  drivers/staging/comedi: dev_node removal (das08_cs)
  drivers/staging/comedi: dev_node removal (cb_das16_cs)
  pata_pcmcia: get rid of extra indirection
  pcmcia: remove suspend-related comment from yenta_socket.c
  pcmcia: call pcmcia_{read,write}_cis_mem with ops_mutex held
  pcmcia: remove pcmcia_add_device_lock
  pcmcia: update gfp/slab.h includes
  pcmcia: remove unused mem_op.h
  pcmcia: do not autoadd root PCI bus resources
  pcmcia: clarify alloc_io_space, move it to resource handlers
  pcmcia: move all pcmcia_resource_ops providers into one module
  pcmcia: move high level CIS access code to separate file
  pcmcia: dev_node removal (core)
  pcmcia: dev_node removal (remaining drivers)
  ...
parents 46ee9645 acd200bf
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
This file details changes in 2.6 which affect PCMCIA card driver authors:
* No dev_node_t (as of 2.6.35)
   There is no more need to fill out a "dev_node_t" structure.

* 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
+8 −39
Original line number Diff line number Diff line
@@ -45,16 +45,6 @@
#define DRV_NAME "pata_pcmcia"
#define DRV_VERSION "0.3.5"

/*
 *	Private data structure to glue stuff together
 */

struct ata_pcmcia_info {
	struct pcmcia_device *pdev;
	int		ndev;
	dev_node_t	node;
};

/**
 *	pcmcia_set_mode	-	PCMCIA specific mode setup
 *	@link: link
@@ -248,7 +238,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
{
	struct ata_host *host;
	struct ata_port *ap;
	struct ata_pcmcia_info *info;
	struct pcmcia_config_check *stk = NULL;
	int is_kme = 0, ret = -ENOMEM, p;
	unsigned long io_base, ctl_base;
@@ -256,19 +245,10 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	int n_ports = 1;
	struct ata_port_operations *ops = &pcmcia_port_ops;

	info = kzalloc(sizeof(*info), GFP_KERNEL);
	if (info == NULL)
		return -ENOMEM;

	/* Glue stuff together. FIXME: We may be able to get rid of info with care */
	info->pdev = pdev;
	pdev->priv = info;

	/* Set up attributes in order to probe card and get resources */
	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 +273,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,21 +323,19 @@ 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;

	info->ndev = 1;
	pdev->priv = host;
	kfree(stk);
	return 0;

failed:
	kfree(stk);
	info->ndev = 0;
	pcmcia_disable_device(pdev);
out1:
	kfree(info);
	return ret;
}

@@ -372,20 +349,12 @@ out1:

static void pcmcia_remove_one(struct pcmcia_device *pdev)
{
	struct ata_pcmcia_info *info = pdev->priv;
	struct device *dev = &pdev->dev;
	struct ata_host *host = pdev->priv;

	if (info != NULL) {
		/* If we have attached the device to the ATA layer, detach it */
		if (info->ndev) {
			struct ata_host *host = dev_get_drvdata(dev);
	if (host)
		ata_host_detach(host);
		}
		info->ndev = 0;
		pdev->priv = NULL;
	}

	pcmcia_disable_device(pdev);
	kfree(info);
}

static struct pcmcia_device_id pcmcia_devices[] = {
+2 −9
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ MODULE_LICENSE("GPL");

typedef struct bluecard_info_t {
	struct pcmcia_device *p_dev;
	dev_node_t node;

	struct hci_dev *hdev;

@@ -869,9 +868,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 +904,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)
@@ -919,9 +915,6 @@ static int bluecard_config(struct pcmcia_device *link)
	if (bluecard_open(info) != 0)
		goto failed;

	strcpy(info->node.dev_name, info->hdev->name);
	link->dev_node = &info->node;

	return 0;

failed:
+2 −9
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ MODULE_FIRMWARE("BT3CPCC.bin");

typedef struct bt3c_info_t {
	struct pcmcia_device *p_dev;
	dev_node_t node;

	struct hci_dev *hdev;

@@ -661,9 +660,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 +739,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)
@@ -754,9 +750,6 @@ found_port:
	if (bt3c_open(info) != 0)
		goto failed;

	strcpy(info->node.dev_name, info->hdev->name);
	link->dev_node = &info->node;

	return 0;

failed:
+2 −9
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ MODULE_LICENSE("GPL");

typedef struct btuart_info_t {
	struct pcmcia_device *p_dev;
	dev_node_t node;

	struct hci_dev *hdev;

@@ -590,9 +589,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 +668,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)
@@ -683,9 +679,6 @@ found_port:
	if (btuart_open(info) != 0)
		goto failed;

	strcpy(info->node.dev_name, info->hdev->name);
	link->dev_node = &info->node;

	return 0;

failed:
Loading