summaryrefslogtreecommitdiffstats
path: root/include/linux/tifm.h
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2007-04-12 16:59:14 +1000
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:04:13 +0200
commite23f2b8a1a52c00f0150659eb0bfde3a73976ffe (patch)
treecd12f24c3b414e01929c323d23dd86e8bc5384f0 /include/linux/tifm.h
parent8dc4a61eca31dd45a9d45f9bc9c67d959f0f6cbd (diff)
downloadlinux-stable-e23f2b8a1a52c00f0150659eb0bfde3a73976ffe.tar.gz
linux-stable-e23f2b8a1a52c00f0150659eb0bfde3a73976ffe.tar.bz2
linux-stable-e23f2b8a1a52c00f0150659eb0bfde3a73976ffe.zip
tifm: simplify bus match and uevent handlers
Remove code duplicating the kernel functionality and clean up data structures involved in driver matching. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/tifm.h')
-rw-r--r--include/linux/tifm.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index ee1056396b95..57b2653494cf 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -74,13 +74,19 @@ enum {
#define TIFM_DMA_TX 0x00008000 /* Meaning of this constant is unverified */
#define TIFM_DMA_EN 0x00000001 /* Meaning of this constant is unverified */
-typedef enum {FM_NULL = 0, FM_XD = 0x01, FM_MS = 0x02, FM_SD = 0x03} tifm_media_id;
+#define TIFM_TYPE_XD 1
+#define TIFM_TYPE_MS 2
+#define TIFM_TYPE_SD 3
+
+struct tifm_device_id {
+ unsigned char type;
+};
struct tifm_driver;
struct tifm_dev {
char __iomem *addr;
spinlock_t lock;
- tifm_media_id media_id;
+ unsigned char type;
unsigned int socket_id;
void (*card_event)(struct tifm_dev *sock);
@@ -90,7 +96,7 @@ struct tifm_dev {
};
struct tifm_driver {
- tifm_media_id *id_table;
+ struct tifm_device_id *id_table;
int (*probe)(struct tifm_dev *dev);
void (*remove)(struct tifm_dev *dev);
int (*suspend)(struct tifm_dev *dev,
@@ -141,8 +147,4 @@ static inline void tifm_set_drvdata(struct tifm_dev *dev, void *data)
dev_set_drvdata(&dev->dev, data);
}
-struct tifm_device_id {
- tifm_media_id media_id;
-};
-
#endif