Commit 566fa176 authored by Vinay K. Nallamothu's avatar Vinay K. Nallamothu Committed by Linus Torvalds

[PATCH] pcmciamtd.c: remove release timer

This patch removes the PCMCIA timer release functionality which is no
longer required (or supported).
parent f41549ab
...@@ -344,9 +344,8 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on) ...@@ -344,9 +344,8 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on)
* still open, this will be postponed until it is closed. * still open, this will be postponed until it is closed.
*/ */
static void pcmciamtd_release(u_long arg) static void pcmciamtd_release(dev_link_t *link)
{ {
dev_link_t *link = (dev_link_t *)arg;
struct pcmciamtd_dev *dev = link->priv; struct pcmciamtd_dev *dev = link->priv;
DEBUG(3, "link = 0x%p", link); DEBUG(3, "link = 0x%p", link);
...@@ -564,7 +563,7 @@ static void pcmciamtd_config(dev_link_t *link) ...@@ -564,7 +563,7 @@ static void pcmciamtd_config(dev_link_t *link)
if(!dev->win_size) { if(!dev->win_size) {
err("Cant allocate memory window"); err("Cant allocate memory window");
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
return; return;
} }
DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10); DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10);
...@@ -576,7 +575,7 @@ static void pcmciamtd_config(dev_link_t *link) ...@@ -576,7 +575,7 @@ static void pcmciamtd_config(dev_link_t *link)
dev->win_base = ioremap(req.Base, req.Size); dev->win_base = ioremap(req.Base, req.Size);
if(!dev->win_base) { if(!dev->win_base) {
err("ioremap(%lu, %u) failed", req.Base, req.Size); err("ioremap(%lu, %u) failed", req.Base, req.Size);
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
return; return;
} }
DEBUG(1, "mapped window dev = %p req.base = 0x%lx base = %p size = 0x%x", DEBUG(1, "mapped window dev = %p req.base = 0x%lx base = %p size = 0x%x",
...@@ -631,7 +630,7 @@ static void pcmciamtd_config(dev_link_t *link) ...@@ -631,7 +630,7 @@ static void pcmciamtd_config(dev_link_t *link)
if(!mtd) { if(!mtd) {
DEBUG(1, "Cant find an MTD"); DEBUG(1, "Cant find an MTD");
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
return; return;
} }
...@@ -671,7 +670,7 @@ static void pcmciamtd_config(dev_link_t *link) ...@@ -671,7 +670,7 @@ static void pcmciamtd_config(dev_link_t *link)
map_destroy(mtd); map_destroy(mtd);
dev->mtd_info = NULL; dev->mtd_info = NULL;
err("Couldnt register MTD device"); err("Couldnt register MTD device");
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
return; return;
} }
snprintf(dev->node.dev_name, sizeof(dev->node.dev_name), "mtd%d", mtd->index); snprintf(dev->node.dev_name, sizeof(dev->node.dev_name), "mtd%d", mtd->index);
...@@ -683,7 +682,7 @@ static void pcmciamtd_config(dev_link_t *link) ...@@ -683,7 +682,7 @@ static void pcmciamtd_config(dev_link_t *link)
cs_failed: cs_failed:
cs_error(link->handle, last_fn, last_ret); cs_error(link->handle, last_fn, last_ret);
err("CS Error, exiting"); err("CS Error, exiting");
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
return; return;
} }
...@@ -710,7 +709,7 @@ static int pcmciamtd_event(event_t event, int priority, ...@@ -710,7 +709,7 @@ static int pcmciamtd_event(event_t event, int priority,
del_mtd_device(dev->mtd_info); del_mtd_device(dev->mtd_info);
info("mtd%d: Removed", dev->mtd_info->index); info("mtd%d: Removed", dev->mtd_info->index);
} }
mod_timer(&link->release, jiffies + HZ/20); pcmciamtd_release(link);
} }
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
...@@ -751,10 +750,8 @@ static void pcmciamtd_detach(dev_link_t *link) ...@@ -751,10 +750,8 @@ static void pcmciamtd_detach(dev_link_t *link)
{ {
DEBUG(3, "link=0x%p", link); DEBUG(3, "link=0x%p", link);
del_timer(&link->release);
if(link->state & DEV_CONFIG) { if(link->state & DEV_CONFIG) {
pcmciamtd_release((u_long)link); pcmciamtd_release(link);
} }
if (link->handle) { if (link->handle) {
...@@ -790,10 +787,6 @@ static dev_link_t *pcmciamtd_attach(void) ...@@ -790,10 +787,6 @@ static dev_link_t *pcmciamtd_attach(void)
link = &dev->link; link = &dev->link;
link->priv = dev; link->priv = dev;
init_timer(&link->release);
link->release.function = &pcmciamtd_release;
link->release.data = (u_long)link;
link->conf.Attributes = 0; link->conf.Attributes = 0;
link->conf.IntType = INT_MEMORY; link->conf.IntType = INT_MEMORY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment