Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46200
b: refs/heads/master
c: 217334d
h: refs/heads/master
v: v3
  • Loading branch information
Alex Dubov authored and Pierre Ossman committed Feb 4, 2007
1 parent f2350a6 commit 20027bf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50743f4cb1d655c7fbe25af58a9d0db6bf76d687
refs/heads/master: 217334d14d28e6a671e6dd2c7a35c9070b0721ea
11 changes: 5 additions & 6 deletions trunk/drivers/misc/tifm_7xx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static void tifm_7xx1_remove_media(struct work_struct *work)
static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id)
{
struct tifm_adapter *fm = dev_id;
struct tifm_dev *sock;
unsigned int irq_status;
unsigned int sock_irq_status, cnt;

Expand All @@ -85,15 +86,13 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id)
writel(TIFM_IRQ_ENABLE, fm->addr + FM_CLEAR_INTERRUPT_ENABLE);

for (cnt = 0; cnt < fm->max_sockets; cnt++) {
sock = fm->sockets[cnt];
sock_irq_status = (irq_status >> cnt) &
(TIFM_IRQ_FIFOMASK | TIFM_IRQ_CARDMASK);

if (fm->sockets[cnt]) {
if (sock_irq_status &&
fm->sockets[cnt]->signal_irq)
fm->sockets[cnt]->
signal_irq(fm->sockets[cnt],
sock_irq_status);
if (sock) {
if (sock_irq_status)
sock->signal_irq(sock, sock_irq_status);

if (irq_status & (1 << cnt))
fm->remove_mask |= 1 << cnt;
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/misc/tifm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ void tifm_free_device(struct device *dev)
}
EXPORT_SYMBOL(tifm_free_device);

static void tifm_dummy_signal_irq(struct tifm_dev *sock,
unsigned int sock_irq_status)
{
return;
}

struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm)
{
struct tifm_dev *dev = kzalloc(sizeof(struct tifm_dev), GFP_KERNEL);
Expand All @@ -155,6 +161,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm)
dev->dev.parent = fm->dev;
dev->dev.bus = &tifm_bus_type;
dev->dev.release = tifm_free_device;
dev->signal_irq = tifm_dummy_signal_irq;
}
return dev;
}
Expand Down Expand Up @@ -212,6 +219,7 @@ static int tifm_device_remove(struct device *dev)
struct tifm_driver *drv = fm_dev->drv;

if (drv) {
fm_dev->signal_irq = tifm_dummy_signal_irq;
if (drv->remove)
drv->remove(fm_dev);
fm_dev->drv = NULL;
Expand Down

0 comments on commit 20027bf

Please sign in to comment.