aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-15 06:43:16 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:55 -0500
commit70294b468302fd7a0a99dad935c7ba5322989345 (patch)
treee54b0b7c85517ef717f3755e06ca08fbb0f5937e /drivers/ide
parent4bbed5231468014b500b048d7370a1c6c349231a (diff)
[PATCH] pcmcia: remove unneeded Vcc pseudo setting
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and Vpp2 can only be set to the same value, a lot of code can be streamlined. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/legacy/ide-cs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 7ad8a95969f..3b5b55f85e2 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -122,7 +122,6 @@ static int ide_attach(struct pcmcia_device *p_dev)
122 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 122 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
123 link->irq.IRQInfo1 = IRQ_LEVEL_ID; 123 link->irq.IRQInfo1 = IRQ_LEVEL_ID;
124 link->conf.Attributes = CONF_ENABLE_IRQ; 124 link->conf.Attributes = CONF_ENABLE_IRQ;
125 link->conf.Vcc = 50;
126 link->conf.IntType = INT_MEMORY_AND_IO; 125 link->conf.IntType = INT_MEMORY_AND_IO;
127 126
128 link->handle = p_dev; 127 link->handle = p_dev;
@@ -222,7 +221,6 @@ static void ide_config(dev_link_t *link)
222 221
223 /* Not sure if this is right... look up the current Vcc */ 222 /* Not sure if this is right... look up the current Vcc */
224 CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &stk->conf)); 223 CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &stk->conf));
225 link->conf.Vcc = stk->conf.Vcc;
226 224
227 pass = io_base = ctl_base = 0; 225 pass = io_base = ctl_base = 0;
228 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 226 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
@@ -244,10 +242,10 @@ static void ide_config(dev_link_t *link)
244 } 242 }
245 243
246 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) 244 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
247 link->conf.Vpp1 = link->conf.Vpp2 = 245 link->conf.Vpp =
248 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; 246 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
249 else if (stk->dflt.vpp1.present & (1 << CISTPL_POWER_VNOM)) 247 else if (stk->dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
250 link->conf.Vpp1 = link->conf.Vpp2 = 248 link->conf.Vpp =
251 stk->dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000; 249 stk->dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
252 250
253 if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) { 251 if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) {
@@ -329,9 +327,8 @@ static void ide_config(dev_link_t *link)
329 info->node.minor = 0; 327 info->node.minor = 0;
330 info->hd = hd; 328 info->hd = hd;
331 link->dev = &info->node; 329 link->dev = &info->node;
332 printk(KERN_INFO "ide-cs: %s: Vcc = %d.%d, Vpp = %d.%d\n", 330 printk(KERN_INFO "ide-cs: %s: Vpp = %d.%d\n",
333 info->node.dev_name, link->conf.Vcc / 10, link->conf.Vcc % 10, 331 info->node.dev_name, link->conf.Vpp / 10, link->conf.Vpp % 10);
334 link->conf.Vpp1 / 10, link->conf.Vpp1 % 10);
335 332
336 link->state &= ~DEV_CONFIG_PENDING; 333 link->state &= ~DEV_CONFIG_PENDING;
337 kfree(stk); 334 kfree(stk);