summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2007-04-12 08:59:17 +0200
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:04:13 +0200
commit6113ed73e61a13db9da48831e1b35788b7f837cc (patch)
treee22d9c8927ea8b987aaf887192e2759959b8527c /include
parenttifm_7xx1: improve card detection routine (diff)
downloadlinux-6113ed73e61a13db9da48831e1b35788b7f837cc.tar.xz
linux-6113ed73e61a13db9da48831e1b35788b7f837cc.zip
tifm: move common adapter management tasks from tifm_7xx1 to tifm_core
Some details of the adapter management (create, add, remove) are really belong to the tifm_core, as they are not hardware specific. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tifm.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index d9de79275c21..a7bd654e2ee5 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -114,19 +114,23 @@ struct tifm_adapter {
unsigned int id;
unsigned int num_sockets;
struct completion *finish_me;
- struct tifm_dev **sockets;
+
struct work_struct media_switcher;
struct class_device cdev;
- struct device *dev;
- void (*eject)(struct tifm_adapter *fm, struct tifm_dev *sock);
+ void (*eject)(struct tifm_adapter *fm,
+ struct tifm_dev *sock);
+
+ struct tifm_dev *sockets[0];
};
-struct tifm_adapter *tifm_alloc_adapter(void);
-void tifm_free_device(struct device *dev);
-void tifm_free_adapter(struct tifm_adapter *fm);
+struct tifm_adapter *tifm_alloc_adapter(unsigned int num_sockets,
+ struct device *dev);
int tifm_add_adapter(struct tifm_adapter *fm);
void tifm_remove_adapter(struct tifm_adapter *fm);
+void tifm_free_adapter(struct tifm_adapter *fm);
+
+void tifm_free_device(struct device *dev);
struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm);
int tifm_register_driver(struct tifm_driver *drv);
void tifm_unregister_driver(struct tifm_driver *drv);