diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-20 21:43:26 +0300 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 12:23:16 +0400 |
commit | b498ada6d0cf0f9828b0c590f9fa2e84f60f5709 (patch) | |
tree | d066ef21b59ff0c7143a9aad2e7bf6f849a496dc /drivers/char/pcmcia | |
parent | c7c2fa079073ab92b0736a161b4cf1051a3e631f (diff) | |
download | linux-b498ada6d0cf0f9828b0c590f9fa2e84f60f5709.tar.xz |
pcmcia: dev_node removal (remaining drivers)
As a fourth step, remove any remaining usages of
dev_node_t from drivers:
- ipwireless can be simplified a bit, as we do not need
to pass around the (write-only) dev_node_t around.
- avma1_cs can be simplified as well, if we only keep the
minor number around as "priv" data, not a full-fledged
struct.
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r-- | drivers/char/pcmcia/ipwireless/main.c | 8 | ||||
-rw-r--r-- | drivers/char/pcmcia/ipwireless/main.h | 1 | ||||
-rw-r--r-- | drivers/char/pcmcia/ipwireless/tty.c | 19 | ||||
-rw-r--r-- | drivers/char/pcmcia/ipwireless/tty.h | 3 |
4 files changed, 7 insertions, 24 deletions
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 2237890bc256..63c32e3f23ba 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -228,8 +228,7 @@ static int config_ipwireless(struct ipw_dev *ipw) if (!ipw->network) goto exit; - ipw->tty = ipwireless_tty_create(ipw->hardware, ipw->network, - ipw->nodes); + ipw->tty = ipwireless_tty_create(ipw->hardware, ipw->network); if (!ipw->tty) goto exit; @@ -244,8 +243,6 @@ static int config_ipwireless(struct ipw_dev *ipw) if (ret != 0) goto exit; - link->dev_node = &ipw->nodes[0]; - return 0; exit: @@ -306,9 +303,6 @@ static int ipwireless_attach(struct pcmcia_device *link) ipw->link = link; link->priv = ipw; - /* Link this device into our device list. */ - link->dev_node = &ipw->nodes[0]; - ipw->hardware = ipwireless_hardware_create(); if (!ipw->hardware) { kfree(ipw); diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h index 0e0363af9ab2..96d0ef31b172 100644 --- a/drivers/char/pcmcia/ipwireless/main.h +++ b/drivers/char/pcmcia/ipwireless/main.h @@ -54,7 +54,6 @@ struct ipw_dev { void __iomem *common_memory; win_req_t request_common_memory; - dev_node_t nodes[2]; /* Reference to attribute memory, containing CIS data */ void *attribute_memory; diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c index 2bb7874a6899..1a2c2c3b068f 100644 --- a/drivers/char/pcmcia/ipwireless/tty.c +++ b/drivers/char/pcmcia/ipwireless/tty.c @@ -487,7 +487,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file, return tty_mode_ioctl(linux_tty, file, cmd , arg); } -static int add_tty(dev_node_t *nodesp, int j, +static int add_tty(int j, struct ipw_hardware *hardware, struct ipw_network *network, int channel_idx, int secondary_channel_idx, int tty_type) @@ -510,19 +510,13 @@ static int add_tty(dev_node_t *nodesp, int j, ipwireless_associate_network_tty(network, secondary_channel_idx, ttys[j]); - if (nodesp != NULL) { - sprintf(nodesp->dev_name, "ttyIPWp%d", j); - nodesp->major = ipw_tty_driver->major; - nodesp->minor = j + ipw_tty_driver->minor_start; - } if (get_tty(j + ipw_tty_driver->minor_start) == ttys[j]) report_registering(ttys[j]); return 0; } struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hardware, - struct ipw_network *network, - dev_node_t *nodes) + struct ipw_network *network) { int i, j; @@ -539,26 +533,23 @@ struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hardware, if (allfree) { j = i; - if (add_tty(&nodes[0], j, hardware, network, + if (add_tty(j, hardware, network, IPW_CHANNEL_DIALLER, IPW_CHANNEL_RAS, TTYTYPE_MODEM)) return NULL; j += IPWIRELESS_PCMCIA_MINOR_RANGE; - if (add_tty(&nodes[1], j, hardware, network, + if (add_tty(j, hardware, network, IPW_CHANNEL_DIALLER, -1, TTYTYPE_MONITOR)) return NULL; j += IPWIRELESS_PCMCIA_MINOR_RANGE; - if (add_tty(NULL, j, hardware, network, + if (add_tty(j, hardware, network, IPW_CHANNEL_RAS, -1, TTYTYPE_RAS_RAW)) return NULL; - nodes[0].next = &nodes[1]; - nodes[1].next = NULL; - return ttys[i]; } } diff --git a/drivers/char/pcmcia/ipwireless/tty.h b/drivers/char/pcmcia/ipwireless/tty.h index b0deb9168b6b..4da6c201f727 100644 --- a/drivers/char/pcmcia/ipwireless/tty.h +++ b/drivers/char/pcmcia/ipwireless/tty.h @@ -34,8 +34,7 @@ int ipwireless_tty_init(void); void ipwireless_tty_release(void); struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hw, - struct ipw_network *net, - dev_node_t *nodes); + struct ipw_network *net); void ipwireless_tty_free(struct ipw_tty *tty); void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data, unsigned int length); |