diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:49:27 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-04 20:12:02 -0500 |
commit | af2b3b503ad1b071b66e1531caae252b4b95c847 (patch) | |
tree | 600785af3af4a79978f688fa35e19ab900db264b /drivers/net/pcmcia/smc91c92_cs.c | |
parent | a9606fd39083478bef313c0e3b77bc065e39e36e (diff) |
[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.
Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index bf408482443e..530df8883fe5 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -959,10 +959,6 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
959 | { | 959 | { |
960 | struct net_device *dev = link->priv; | 960 | struct net_device *dev = link->priv; |
961 | struct smc_private *smc = netdev_priv(dev); | 961 | struct smc_private *smc = netdev_priv(dev); |
962 | struct smc_cfg_mem *cfg_mem; | ||
963 | tuple_t *tuple; | ||
964 | cisparse_t *parse; | ||
965 | u_char *buf; | ||
966 | char *name; | 962 | char *name; |
967 | int i, j, rev; | 963 | int i, j, rev; |
968 | kio_addr_t ioaddr; | 964 | kio_addr_t ioaddr; |
@@ -970,24 +966,6 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
970 | 966 | ||
971 | DEBUG(0, "smc91c92_config(0x%p)\n", link); | 967 | DEBUG(0, "smc91c92_config(0x%p)\n", link); |
972 | 968 | ||
973 | cfg_mem = kmalloc(sizeof(struct smc_cfg_mem), GFP_KERNEL); | ||
974 | if (!cfg_mem) | ||
975 | goto config_failed; | ||
976 | |||
977 | tuple = &cfg_mem->tuple; | ||
978 | parse = &cfg_mem->parse; | ||
979 | buf = cfg_mem->buf; | ||
980 | |||
981 | tuple->Attributes = tuple->TupleOffset = 0; | ||
982 | tuple->TupleData = (cisdata_t *)buf; | ||
983 | tuple->TupleDataMax = 64; | ||
984 | |||
985 | tuple->DesiredTuple = CISTPL_CONFIG; | ||
986 | i = first_tuple(link, tuple, parse); | ||
987 | CS_EXIT_TEST(i, ParseTuple, config_failed); | ||
988 | link->conf.ConfigBase = parse->config.base; | ||
989 | link->conf.Present = parse->config.rmask[0]; | ||
990 | |||
991 | smc->manfid = link->manf_id; | 969 | smc->manfid = link->manf_id; |
992 | smc->cardid = link->card_id; | 970 | smc->cardid = link->card_id; |
993 | 971 | ||
@@ -1119,14 +1097,12 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
1119 | printk(KERN_NOTICE " No MII transceivers found!\n"); | 1097 | printk(KERN_NOTICE " No MII transceivers found!\n"); |
1120 | } | 1098 | } |
1121 | } | 1099 | } |
1122 | kfree(cfg_mem); | ||
1123 | return 0; | 1100 | return 0; |
1124 | 1101 | ||
1125 | config_undo: | 1102 | config_undo: |
1126 | unregister_netdev(dev); | 1103 | unregister_netdev(dev); |
1127 | config_failed: /* CS_EXIT_TEST() calls jump to here... */ | 1104 | config_failed: /* CS_EXIT_TEST() calls jump to here... */ |
1128 | smc91c92_release(link); | 1105 | smc91c92_release(link); |
1129 | kfree(cfg_mem); | ||
1130 | return -ENODEV; | 1106 | return -ENODEV; |
1131 | } /* smc91c92_config */ | 1107 | } /* smc91c92_config */ |
1132 | 1108 | ||