summaryrefslogtreecommitdiff
path: root/include/linux/tifm.h
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2007-04-12 17:05:26 +1000
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:04:15 +0200
commit91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b (patch)
tree9388456276e9384e190d88f7ef8e229768d9362e /include/linux/tifm.h
parent13cdf48ef15befbd36f8295091b9e0f9bd322963 (diff)
downloadlinux-3.10-91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b.tar.gz
linux-3.10-91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b.tar.bz2
linux-3.10-91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b.zip
tifm: layout fixes, small changes to comments and printfs
Cosmetic changes to the code. 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.h69
1 files changed, 35 insertions, 34 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index 7ccad079546..2a196982601 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -14,16 +14,16 @@
#include <linux/spinlock.h>
#include <linux/interrupt.h>
-#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/pci.h>
-#include <linux/kthread.h>
+#include <linux/workqueue.h>
/* Host registers (relative to pci base address): */
enum {
FM_SET_INTERRUPT_ENABLE = 0x008,
FM_CLEAR_INTERRUPT_ENABLE = 0x00c,
- FM_INTERRUPT_STATUS = 0x014 };
+ FM_INTERRUPT_STATUS = 0x014
+};
/* Socket registers (relative to socket base address): */
enum {
@@ -58,7 +58,8 @@ enum {
SOCK_MS_DATA = 0x188,
SOCK_MS_STATUS = 0x18c,
SOCK_MS_SYSTEM = 0x190,
- SOCK_FIFO_ACCESS = 0x200 };
+ SOCK_FIFO_ACCESS = 0x200
+};
#define TIFM_CTRL_LED 0x00000040
#define TIFM_CTRL_FAST_CLK 0x00000100
@@ -66,14 +67,14 @@ enum {
#define TIFM_SOCK_STATE_OCCUPIED 0x00000008
#define TIFM_SOCK_STATE_POWERED 0x00000080
-#define TIFM_FIFO_ENABLE 0x00000001 /* Meaning of this constant is unverified */
-#define TIFM_FIFO_READY 0x00000001 /* Meaning of this constant is unverified */
+#define TIFM_FIFO_ENABLE 0x00000001
+#define TIFM_FIFO_READY 0x00000001
#define TIFM_FIFO_INT_SETALL 0x0000ffff
-#define TIFM_FIFO_INTMASK 0x00000005 /* Meaning of this constant is unverified */
+#define TIFM_FIFO_INTMASK 0x00000005
-#define TIFM_DMA_RESET 0x00000002 /* Meaning of this constant is unverified */
-#define TIFM_DMA_TX 0x00008000 /* Meaning of this constant is unverified */
-#define TIFM_DMA_EN 0x00000001 /* Meaning of this constant is unverified */
+#define TIFM_DMA_RESET 0x00000002
+#define TIFM_DMA_TX 0x00008000
+#define TIFM_DMA_EN 0x00000001
#define TIFM_DMA_TSIZE 0x0000007f
#define TIFM_TYPE_XD 1
@@ -86,44 +87,44 @@ struct tifm_device_id {
struct tifm_driver;
struct tifm_dev {
- char __iomem *addr;
- spinlock_t lock;
- unsigned char type;
- unsigned int socket_id;
+ char __iomem *addr;
+ spinlock_t lock;
+ unsigned char type;
+ unsigned int socket_id;
void (*card_event)(struct tifm_dev *sock);
void (*data_event)(struct tifm_dev *sock);
- struct device dev;
+ struct device dev;
};
struct tifm_driver {
struct tifm_device_id *id_table;
- int (*probe)(struct tifm_dev *dev);
- void (*remove)(struct tifm_dev *dev);
- int (*suspend)(struct tifm_dev *dev,
- pm_message_t state);
- int (*resume)(struct tifm_dev *dev);
+ int (*probe)(struct tifm_dev *dev);
+ void (*remove)(struct tifm_dev *dev);
+ int (*suspend)(struct tifm_dev *dev,
+ pm_message_t state);
+ int (*resume)(struct tifm_dev *dev);
- struct device_driver driver;
+ struct device_driver driver;
};
struct tifm_adapter {
- char __iomem *addr;
- spinlock_t lock;
- unsigned int irq_status;
- unsigned int socket_change_set;
- unsigned int id;
- unsigned int num_sockets;
- struct completion *finish_me;
+ char __iomem *addr;
+ spinlock_t lock;
+ unsigned int irq_status;
+ unsigned int socket_change_set;
+ unsigned int id;
+ unsigned int num_sockets;
+ struct completion *finish_me;
- struct work_struct media_switcher;
- struct class_device cdev;
+ struct work_struct media_switcher;
+ struct class_device cdev;
- 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_dev *sockets[0];
};
struct tifm_adapter *tifm_alloc_adapter(unsigned int num_sockets,
@@ -147,7 +148,7 @@ void tifm_queue_work(struct work_struct *work);
static inline void *tifm_get_drvdata(struct tifm_dev *dev)
{
- return dev_get_drvdata(&dev->dev);
+ return dev_get_drvdata(&dev->dev);
}
static inline void tifm_set_drvdata(struct tifm_dev *dev, void *data)