diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-29 08:06:42 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 11:20:21 -0400 |
commit | fb49fa533f9d211994c33efb752ffa5b30033729 (patch) | |
tree | 675d26cf01c23d9623f274971a065b0dedb10f3a /drivers/mtd | |
parent | cdb138080b78146d1cdadba9f5dadbeb97445b91 (diff) |
pcmcia: split up modify_configuration() into two fixup functions
pcmcia_modify_configuration() was only used by two drivers to fix up
one issue each: setting the Vpp to a different value, and reducing
the IO width to 8 bit. Introduce two explicitly named functions
handling these things, and remove one further typedef.
CC: netdev@vger.kernel.org
CC: linux-mtd@lists.infradead.org
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index fb3c5380aa84..31ce404baa3c 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -316,15 +316,9 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on) | |||
316 | { | 316 | { |
317 | struct pcmciamtd_dev *dev = (struct pcmciamtd_dev *)map->map_priv_1; | 317 | struct pcmciamtd_dev *dev = (struct pcmciamtd_dev *)map->map_priv_1; |
318 | struct pcmcia_device *link = dev->p_dev; | 318 | struct pcmcia_device *link = dev->p_dev; |
319 | modconf_t mod; | ||
320 | int ret; | ||
321 | |||
322 | mod.Attributes = CONF_VPP1_CHANGE_VALID | CONF_VPP2_CHANGE_VALID; | ||
323 | mod.Vcc = 0; | ||
324 | mod.Vpp1 = mod.Vpp2 = on ? dev->vpp : 0; | ||
325 | 319 | ||
326 | DEBUG(2, "dev = %p on = %d vpp = %d\n", dev, on, dev->vpp); | 320 | DEBUG(2, "dev = %p on = %d vpp = %d\n", dev, on, dev->vpp); |
327 | ret = pcmcia_modify_configuration(link, &mod); | 321 | pcmcia_fixup_vpp(link, on ? dev->vpp : 0); |
328 | } | 322 | } |
329 | 323 | ||
330 | 324 | ||