diff options
-rw-r--r-- | drivers/misc/tifm_7xx1.c | 11 | ||||
-rw-r--r-- | drivers/misc/tifm_core.c | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index 375b56742f2b..7fbf5d58bfc5 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c | |||
@@ -71,6 +71,7 @@ static void tifm_7xx1_remove_media(struct work_struct *work) | |||
71 | static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) | 71 | static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) |
72 | { | 72 | { |
73 | struct tifm_adapter *fm = dev_id; | 73 | struct tifm_adapter *fm = dev_id; |
74 | struct tifm_dev *sock; | ||
74 | unsigned int irq_status; | 75 | unsigned int irq_status; |
75 | unsigned int sock_irq_status, cnt; | 76 | unsigned int sock_irq_status, cnt; |
76 | 77 | ||
@@ -85,15 +86,13 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) | |||
85 | writel(TIFM_IRQ_ENABLE, fm->addr + FM_CLEAR_INTERRUPT_ENABLE); | 86 | writel(TIFM_IRQ_ENABLE, fm->addr + FM_CLEAR_INTERRUPT_ENABLE); |
86 | 87 | ||
87 | for (cnt = 0; cnt < fm->max_sockets; cnt++) { | 88 | for (cnt = 0; cnt < fm->max_sockets; cnt++) { |
89 | sock = fm->sockets[cnt]; | ||
88 | sock_irq_status = (irq_status >> cnt) & | 90 | sock_irq_status = (irq_status >> cnt) & |
89 | (TIFM_IRQ_FIFOMASK | TIFM_IRQ_CARDMASK); | 91 | (TIFM_IRQ_FIFOMASK | TIFM_IRQ_CARDMASK); |
90 | 92 | ||
91 | if (fm->sockets[cnt]) { | 93 | if (sock) { |
92 | if (sock_irq_status && | 94 | if (sock_irq_status) |
93 | fm->sockets[cnt]->signal_irq) | 95 | sock->signal_irq(sock, sock_irq_status); |
94 | fm->sockets[cnt]-> | ||
95 | signal_irq(fm->sockets[cnt], | ||
96 | sock_irq_status); | ||
97 | 96 | ||
98 | if (irq_status & (1 << cnt)) | 97 | if (irq_status & (1 << cnt)) |
99 | fm->remove_mask |= 1 << cnt; | 98 | fm->remove_mask |= 1 << cnt; |
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index 21eb0ab7c329..3eaf2c985b7d 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c | |||
@@ -145,6 +145,12 @@ void tifm_free_device(struct device *dev) | |||
145 | } | 145 | } |
146 | EXPORT_SYMBOL(tifm_free_device); | 146 | EXPORT_SYMBOL(tifm_free_device); |
147 | 147 | ||
148 | static void tifm_dummy_signal_irq(struct tifm_dev *sock, | ||
149 | unsigned int sock_irq_status) | ||
150 | { | ||
151 | return; | ||
152 | } | ||
153 | |||
148 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm) | 154 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm) |
149 | { | 155 | { |
150 | struct tifm_dev *dev = kzalloc(sizeof(struct tifm_dev), GFP_KERNEL); | 156 | struct tifm_dev *dev = kzalloc(sizeof(struct tifm_dev), GFP_KERNEL); |
@@ -155,6 +161,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm) | |||
155 | dev->dev.parent = fm->dev; | 161 | dev->dev.parent = fm->dev; |
156 | dev->dev.bus = &tifm_bus_type; | 162 | dev->dev.bus = &tifm_bus_type; |
157 | dev->dev.release = tifm_free_device; | 163 | dev->dev.release = tifm_free_device; |
164 | dev->signal_irq = tifm_dummy_signal_irq; | ||
158 | } | 165 | } |
159 | return dev; | 166 | return dev; |
160 | } | 167 | } |
@@ -212,6 +219,7 @@ static int tifm_device_remove(struct device *dev) | |||
212 | struct tifm_driver *drv = fm_dev->drv; | 219 | struct tifm_driver *drv = fm_dev->drv; |
213 | 220 | ||
214 | if (drv) { | 221 | if (drv) { |
222 | fm_dev->signal_irq = tifm_dummy_signal_irq; | ||
215 | if (drv->remove) | 223 | if (drv->remove) |
216 | drv->remove(fm_dev); | 224 | drv->remove(fm_dev); |
217 | fm_dev->drv = NULL; | 225 | fm_dev->drv = NULL; |