Commit a1e52b44 authored by Russell King's avatar Russell King

[SERIAL] 8250_cs update - remove work queue

Remove the work queue for serial_remove; events always happen
in process context now so the work queue gains us nothing.
parent 8702a472
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/workqueue.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -108,7 +107,6 @@ struct serial_info { ...@@ -108,7 +107,6 @@ struct serial_info {
int manfid; int manfid;
dev_node_t node[4]; dev_node_t node[4];
int line[4]; int line[4];
struct work_struct remove;
}; };
static void serial_config(dev_link_t * link); static void serial_config(dev_link_t * link);
...@@ -124,20 +122,19 @@ static dev_link_t *dev_list = NULL; ...@@ -124,20 +122,19 @@ static dev_link_t *dev_list = NULL;
/*====================================================================== /*======================================================================
After a card is removed, do_serial_release() will unregister After a card is removed, serial_remove() will unregister
the serial device(s), and release the PCMCIA configuration. the serial device(s), and release the PCMCIA configuration.
======================================================================*/ ======================================================================*/
/* static void serial_remove(dev_link_t *link)
* This always runs in process context.
*/
static void do_serial_release(void *arg)
{ {
struct serial_info *info = arg; struct serial_info *info = link->priv;
int i; int i, ret;
DEBUG(0, "serial_release(0x%p)\n", &info->link); link->state &= ~DEV_PRESENT;
DEBUG(0, "serial_release(0x%p)\n", link);
/* /*
* Recheck to see if the device is still configured. * Recheck to see if the device is still configured.
...@@ -158,25 +155,6 @@ static void do_serial_release(void *arg) ...@@ -158,25 +155,6 @@ static void do_serial_release(void *arg)
} }
} }
/*
* This may be called from IRQ context.
*/
static void serial_remove(dev_link_t *link)
{
struct serial_info *info = link->priv;
link->state &= ~DEV_PRESENT;
/*
* FIXME: Since the card has probably been removed,
* we should call into the serial layer and hang up
* the ports on the card immediately.
*/
if (link->state & DEV_CONFIG)
schedule_work(&info->remove);
}
/*====================================================================== /*======================================================================
serial_attach() creates an "instance" of the driver, allocating serial_attach() creates an "instance" of the driver, allocating
...@@ -202,8 +180,6 @@ static dev_link_t *serial_attach(void) ...@@ -202,8 +180,6 @@ static dev_link_t *serial_attach(void)
link = &info->link; link = &info->link;
link->priv = info; link->priv = info;
INIT_WORK(&info->remove, do_serial_release, info);
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8; link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
...@@ -275,7 +251,7 @@ static void serial_detach(dev_link_t * link) ...@@ -275,7 +251,7 @@ static void serial_detach(dev_link_t * link)
/* /*
* Ensure that the ports have been released. * Ensure that the ports have been released.
*/ */
do_serial_release(info); serial_remove(link);
if (link->handle) { if (link->handle) {
ret = CardServices(DeregisterClient, link->handle); ret = CardServices(DeregisterClient, link->handle);
...@@ -631,7 +607,7 @@ void serial_config(dev_link_t * link) ...@@ -631,7 +607,7 @@ void serial_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);
failed: failed:
do_serial_release(info); serial_remove(link);
} }
/*====================================================================== /*======================================================================
......
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