aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tifm.h
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2006-12-18 14:20:06 +1100
committerPierre Ossman <drzeus@drzeus.cx>2007-02-04 20:54:09 +0100
commit7146f0d3bd2bcd0100a5db54f4ba9edc1042fe01 (patch)
treebb8dd99b153d6aa8fe565be7256a586b0abd2977 /include/linux/tifm.h
parent6412d927313f08808d61b7efba8da43717d4e8d2 (diff)
downloadkernel_samsung_smdk4412-7146f0d3bd2bcd0100a5db54f4ba9edc1042fe01.zip
kernel_samsung_smdk4412-7146f0d3bd2bcd0100a5db54f4ba9edc1042fe01.tar.gz
kernel_samsung_smdk4412-7146f0d3bd2bcd0100a5db54f4ba9edc1042fe01.tar.bz2
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/linux/tifm.h')
-rw-r--r--include/linux/tifm.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index eaf9e1f..e5a8295 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -17,7 +17,7 @@
#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/pci.h>
-#include <linux/scatterlist.h>
+#include <linux/kthread.h>
/* Host registers (relative to pci base address): */
enum {
@@ -110,13 +110,11 @@ struct tifm_adapter {
spinlock_t lock;
unsigned int irq_status;
unsigned int socket_change_set;
+ wait_queue_head_t change_set_notify;
unsigned int id;
unsigned int num_sockets;
struct tifm_dev **sockets;
- char wq_name[KOBJ_NAME_LEN];
- unsigned int inhibit_new_cards;
- struct workqueue_struct *wq;
- struct work_struct media_switcher;
+ struct task_struct *media_switcher;
struct class_device cdev;
struct device *dev;
@@ -126,7 +124,7 @@ struct tifm_adapter {
struct tifm_adapter *tifm_alloc_adapter(void);
void tifm_free_device(struct device *dev);
void tifm_free_adapter(struct tifm_adapter *fm);
-int tifm_add_adapter(struct tifm_adapter *fm);
+int tifm_add_adapter(struct tifm_adapter *fm, int (*mediathreadfn)(void *data));
void tifm_remove_adapter(struct tifm_adapter *fm);
struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm);
int tifm_register_driver(struct tifm_driver *drv);