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

Commit 5f2a71fc authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

[PATCH] pcmcia: add pcmcia_disable_device



pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary
cleanups upon device or driver removal: it calls the appropriate
pcmcia_release_* functions, and can replace (most) of the current drivers'
_release() functions.

Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 1de9cedf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
This file details changes in 2.6 which affect PCMCIA card driver authors:

* New release helper (as of 2.6.17)
   Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
   necessary now is calling pcmcia_disable_device. As there is no valid
   reason left to call pcmcia_release_io and pcmcia_release_irq, they will
   be removed soon.

* Unify detach and REMOVAL event code, as well as attach and INSERTION
  code (as of 2.6.16)
       void (*remove)          (struct pcmcia_device *dev);
+1 −7
Original line number Diff line number Diff line
@@ -1002,13 +1002,7 @@ static void bluecard_release(dev_link_t *link)

	del_timer(&(info->timer));

	link->dev = NULL;

	pcmcia_release_configuration(link->handle);
	pcmcia_release_io(link->handle, &link->io);
	pcmcia_release_irq(link->handle, &link->irq);

	link->state &= ~DEV_CONFIG;
	pcmcia_disable_device(link->handle);
}

static int bluecard_suspend(struct pcmcia_device *dev)
+1 −7
Original line number Diff line number Diff line
@@ -839,13 +839,7 @@ static void bt3c_release(dev_link_t *link)
	if (link->state & DEV_PRESENT)
		bt3c_close(info);

	link->dev = NULL;

	pcmcia_release_configuration(link->handle);
	pcmcia_release_io(link->handle, &link->io);
	pcmcia_release_irq(link->handle, &link->irq);

	link->state &= ~DEV_CONFIG;
	pcmcia_disable_device(link->handle);
}

static int bt3c_suspend(struct pcmcia_device *dev)
+1 −7
Original line number Diff line number Diff line
@@ -768,13 +768,7 @@ static void btuart_release(dev_link_t *link)
	if (link->state & DEV_PRESENT)
		btuart_close(info);

	link->dev = NULL;

	pcmcia_release_configuration(link->handle);
	pcmcia_release_io(link->handle, &link->io);
	pcmcia_release_irq(link->handle, &link->irq);

	link->state &= ~DEV_CONFIG;
	pcmcia_disable_device(link->handle);
}

static int btuart_suspend(struct pcmcia_device *dev)
+1 −7
Original line number Diff line number Diff line
@@ -720,13 +720,7 @@ static void dtl1_release(dev_link_t *link)
	if (link->state & DEV_PRESENT)
		dtl1_close(info);

	link->dev = NULL;

	pcmcia_release_configuration(link->handle);
	pcmcia_release_io(link->handle, &link->io);
	pcmcia_release_irq(link->handle, &link->irq);

	link->state &= ~DEV_CONFIG;
	pcmcia_disable_device(link->handle);
}

static int dtl1_suspend(struct pcmcia_device *dev)
Loading