summaryrefslogtreecommitdiff
path: root/drkaiser.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-06 09:55:48 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-06 09:55:48 +0000
commit744132af4b9f629716394f9c22f6add71cc73ef9 (patch)
tree46de6c5dc108fc2868603fdc606e7328a83f1703 /drkaiser.c
parentd1be52d545329debd2128c1aa8685b31dfaa0a0e (diff)
downloadflashrom-git-744132af4b9f629716394f9c22f6add71cc73ef9.tar.gz
Various places in the flashrom source feature custom parameter extraction from programmer_param
This led to wildly differing syntax for programmer parameters, and it also voids pretty much every assumption you could make about programmer_param. The latter is a problem for libflashrom. Use extract_param everywhere, clean up related code and make it more foolproof. Add two instances of exit(1) where we have no option to return an error. Remove six instances of exit(1) where returning an error was possible. WARNING: This changes programmer parameter syntax for a few programmers! Corresponding to flashrom svn r1070. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'drkaiser.c')
-rw-r--r--drkaiser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drkaiser.c b/drkaiser.c
index 3bbff7c4..ee3904ef 100644
--- a/drkaiser.c
+++ b/drkaiser.c
@@ -38,8 +38,9 @@ int drkaiser_init(void)
uint32_t addr;
get_io_perms();
+
pcidev_init(PCI_VENDOR_ID_DRKAISER, PCI_BASE_ADDRESS_2,
- drkaiser_pcidev, programmer_param);
+ drkaiser_pcidev);
/* Write magic register to enable flash write. */
pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR,
@@ -53,6 +54,7 @@ int drkaiser_init(void)
addr, 128 * 1024);
buses_supported = CHIP_BUSTYPE_PARALLEL;
+
return 0;
}
@@ -60,7 +62,6 @@ int drkaiser_shutdown(void)
{
/* Write protect the flash again. */
pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR, 0);
- free(programmer_param);
pci_cleanup(pacc);
release_io_perms();
return 0;