diff options
author | Alex Dubov <oakad@yahoo.com> | 2006-12-17 22:20:06 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-02-04 14:54:09 -0500 |
commit | 7146f0d3bd2bcd0100a5db54f4ba9edc1042fe01 (patch) | |
tree | bb8dd99b153d6aa8fe565be7256a586b0abd2977 /include | |
parent | 6412d927313f08808d61b7efba8da43717d4e8d2 (diff) |
tifm_7xx1: switch from workqueue to kthread
As there's only one work item (media_switcher) to handle and it's effectively
serialized with itself, I found it more convenient to use kthread instead of
workqueue. This also allows for a working implementation of suspend/resume,
which were totally broken in the past version.
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.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index eaf9e1f48780..e5a8295f9fbc 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/scatterlist.h> | 20 | #include <linux/kthread.h> |
21 | 21 | ||
22 | /* Host registers (relative to pci base address): */ | 22 | /* Host registers (relative to pci base address): */ |
23 | enum { | 23 | enum { |
@@ -110,13 +110,11 @@ struct tifm_adapter { | |||
110 | spinlock_t lock; | 110 | spinlock_t lock; |
111 | unsigned int irq_status; | 111 | unsigned int irq_status; |
112 | unsigned int socket_change_set; | 112 | unsigned int socket_change_set; |
113 | wait_queue_head_t change_set_notify; | ||
113 | unsigned int id; | 114 | unsigned int id; |
114 | unsigned int num_sockets; | 115 | unsigned int num_sockets; |
115 | struct tifm_dev **sockets; | 116 | struct tifm_dev **sockets; |
116 | char wq_name[KOBJ_NAME_LEN]; | 117 | struct task_struct *media_switcher; |
117 | unsigned int inhibit_new_cards; | ||
118 | struct workqueue_struct *wq; | ||
119 | struct work_struct media_switcher; | ||
120 | struct class_device cdev; | 118 | struct class_device cdev; |
121 | struct device *dev; | 119 | struct device *dev; |
122 | 120 | ||
@@ -126,7 +124,7 @@ struct tifm_adapter { | |||
126 | struct tifm_adapter *tifm_alloc_adapter(void); | 124 | struct tifm_adapter *tifm_alloc_adapter(void); |
127 | void tifm_free_device(struct device *dev); | 125 | void tifm_free_device(struct device *dev); |
128 | void tifm_free_adapter(struct tifm_adapter *fm); | 126 | void tifm_free_adapter(struct tifm_adapter *fm); |
129 | int tifm_add_adapter(struct tifm_adapter *fm); | 127 | int tifm_add_adapter(struct tifm_adapter *fm, int (*mediathreadfn)(void *data)); |
130 | void tifm_remove_adapter(struct tifm_adapter *fm); | 128 | void tifm_remove_adapter(struct tifm_adapter *fm); |
131 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm); | 129 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm); |
132 | int tifm_register_driver(struct tifm_driver *drv); | 130 | int tifm_register_driver(struct tifm_driver *drv); |