[PATCH] pcmcia: new suspend core

Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index cb8b6e6..0200551 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -137,6 +137,10 @@
 	int (*event)		(event_t event, int priority,
 				 event_callback_args_t *);
 	void			(*detach)(dev_link_t *);
+
+	int (*suspend)		(struct pcmcia_device *dev);
+	int (*resume)		(struct pcmcia_device *dev);
+
 	struct module		*owner;
 	struct pcmcia_device_id	*id_table;
 	struct device_driver	drv;
@@ -193,6 +197,8 @@
 #define handle_to_pdev(handle) (handle)
 #define handle_to_dev(handle) (handle->dev)
 
+#define dev_to_instance(dev) (dev->instance)
+
 /* error reporting */
 void cs_error(client_handle_t handle, int func, int ret);