Edward O'Callaghan has uploaded this change for review.
wip
Change-Id: Ie02803d93a02ab57a070a284d8ff3dd2a7d90e47
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M atahpt.c
M atapromise.c
M atavia.c
M buspirate_spi.c
M ch341a_spi.c
M dediprog.c
M developerbox_spi.c
M digilent_spi.c
M dirtyjtag_spi.c
M drkaiser.c
M dummyflasher.c
M ft2232_spi.c
M gfxnvidia.c
M internal.c
M it8212.c
M jlink_spi.c
M linux_mtd.c
M linux_spi.c
M mediatek_i2c_spi.c
M mstarddc_spi.c
M ni845x_spi.c
M nic3com.c
M nicintel.c
M nicintel_eeprom.c
M nicintel_spi.c
M nicnatsemi.c
M nicrealtek.c
M ogp_spi.c
M parade_lspcon.c
M pcidev.c
M pickit2_spi.c
M pony_spi.c
M raiden_debug_spi.c
M rayer_spi.c
M realtek_mst_i2c_spi.c
M satamv.c
M satasii.c
M serprog.c
M stlinkv3_spi.c
M tests/tests.c
M usb_device.c
M usbblaster_spi.c
42 files changed, 53 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/71747/1
diff --git a/atahpt.c b/atahpt.c
index 71fd4d5..8abbc4a 100644
--- a/atahpt.c
+++ b/atahpt.c
@@ -78,7 +78,7 @@
.shutdown = atahpt_shutdown,
};
-static int atahpt_init(const struct programmer_cfg *cfg)
+static int atahpt_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t io_base_addr;
diff --git a/atapromise.c b/atapromise.c
index 9beebf1..6073770 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -117,7 +117,7 @@
.shutdown = atapromise_shutdown,
};
-static int atapromise_init(const struct programmer_cfg *cfg)
+static int atapromise_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t io_base_addr;
diff --git a/atavia.c b/atavia.c
index f35771a..d9dbda9 100644
--- a/atavia.c
+++ b/atavia.c
@@ -138,7 +138,7 @@
.chip_writeb = atavia_chip_writeb,
};
-static int atavia_init(const struct programmer_cfg *cfg)
+static int atavia_init(struct programmer_cfg *cfg)
{
char *arg = extract_programmer_param_str(cfg, "offset");
if (arg) {
diff --git a/buspirate_spi.c b/buspirate_spi.c
index a40fb70..86d3950 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -314,7 +314,7 @@
*/
#define BP_DIVISOR(baud) ((4000000/(baud)) - 1)
-static int buspirate_spi_init(const struct programmer_cfg *cfg)
+static int buspirate_spi_init(struct programmer_cfg *cfg)
{
char *tmp;
char *dev;
diff --git a/ch341a_spi.c b/ch341a_spi.c
index 75eaf86..142fd4e 100644
--- a/ch341a_spi.c
+++ b/ch341a_spi.c
@@ -421,7 +421,7 @@
.delay = ch341a_spi_delay,
};
-static int ch341a_spi_init(const struct programmer_cfg *cfg)
+static int ch341a_spi_init(struct programmer_cfg *cfg)
{
if (handle != NULL) {
msg_cerr("%s: handle already set! Please report a bug at flashrom@flashrom.org\n", __func__);
diff --git a/dediprog.c b/dediprog.c
index 723f4a8..7fd6c9d 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -1076,7 +1076,7 @@
return 0;
}
-static int dediprog_init(const struct programmer_cfg *cfg)
+static int dediprog_init(struct programmer_cfg *cfg)
{
char *param_str;
int spispeed_idx = 1;
diff --git a/developerbox_spi.c b/developerbox_spi.c
index 64b7e8a..c29fcc5 100644
--- a/developerbox_spi.c
+++ b/developerbox_spi.c
@@ -142,7 +142,7 @@
return 0;
}
-static int developerbox_spi_init(const struct programmer_cfg *cfg)
+static int developerbox_spi_init(struct programmer_cfg *cfg)
{
struct libusb_context *usb_ctx;
libusb_device_handle *cp210x_handle;
diff --git a/digilent_spi.c b/digilent_spi.c
index 55cb6ec..68a0e21 100644
--- a/digilent_spi.c
+++ b/digilent_spi.c
@@ -373,7 +373,7 @@
{ NULL, 0 },
};
-static int digilent_spi_init(const struct programmer_cfg *cfg)
+static int digilent_spi_init(struct programmer_cfg *cfg)
{
char *param_str;
uint32_t speed_hz = spispeeds[0].speed;
diff --git a/dirtyjtag_spi.c b/dirtyjtag_spi.c
index 42169ed..9035e91 100644
--- a/dirtyjtag_spi.c
+++ b/dirtyjtag_spi.c
@@ -201,7 +201,7 @@
.probe_opcode = default_spi_probe_opcode,
};
-static int dirtyjtag_spi_init(const struct programmer_cfg *cfg)
+static int dirtyjtag_spi_init(struct programmer_cfg *cfg)
{
struct libusb_device_handle *handle = NULL;
struct dirtyjtag_spi_data *djtag_data = NULL;
diff --git a/drkaiser.c b/drkaiser.c
index ebf5119..17343dc 100644
--- a/drkaiser.c
+++ b/drkaiser.c
@@ -75,7 +75,7 @@
.shutdown = drkaiser_shutdown,
};
-static int drkaiser_init(const struct programmer_cfg *cfg)
+static int drkaiser_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t addr;
diff --git a/dummyflasher.c b/dummyflasher.c
index 1960e92..4928a77 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -1343,7 +1343,7 @@
return 0;
}
-static int dummy_init(const struct programmer_cfg *cfg)
+static int dummy_init(struct programmer_cfg *cfg)
{
struct stat image_stat;
diff --git a/ft2232_spi.c b/ft2232_spi.c
index dfec1a0..228a15b 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -304,7 +304,7 @@
};
/* Returns 0 upon success, a negative number upon errors. */
-static int ft2232_spi_init(const struct programmer_cfg *cfg)
+static int ft2232_spi_init(struct programmer_cfg *cfg)
{
int ret = 0;
unsigned char buf[512];
diff --git a/gfxnvidia.c b/gfxnvidia.c
index b420975..d7fd842 100644
--- a/gfxnvidia.c
+++ b/gfxnvidia.c
@@ -100,7 +100,7 @@
.shutdown = gfxnvidia_shutdown,
};
-static int gfxnvidia_init(const struct programmer_cfg *cfg)
+static int gfxnvidia_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t reg32;
diff --git a/internal.c b/internal.c
index f21c4fc..1161652 100644
--- a/internal.c
+++ b/internal.c
@@ -191,7 +191,7 @@
return 0;
}
-static int internal_init(const struct programmer_cfg *cfg)
+static int internal_init(struct programmer_cfg *cfg)
{
int ret = 0;
bool force_laptop;
diff --git a/it8212.c b/it8212.c
index 3c1161d..de45e61 100644
--- a/it8212.c
+++ b/it8212.c
@@ -68,7 +68,7 @@
.shutdown = it8212_shutdown,
};
-static int it8212_init(const struct programmer_cfg *cfg)
+static int it8212_init(struct programmer_cfg *cfg)
{
uint8_t *bar;
diff --git a/jlink_spi.c b/jlink_spi.c
index ad2ca78..48fd6ca 100644
--- a/jlink_spi.c
+++ b/jlink_spi.c
@@ -192,7 +192,7 @@
.probe_opcode = default_spi_probe_opcode,
};
-static int jlink_spi_init(const struct programmer_cfg *cfg)
+static int jlink_spi_init(struct programmer_cfg *cfg)
{
char *arg;
unsigned long speed = 0;
diff --git a/linux_mtd.c b/linux_mtd.c
index 495db9a..5f747ac 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -494,7 +494,7 @@
return ret;
}
-static int linux_mtd_init(const struct programmer_cfg *cfg)
+static int linux_mtd_init(struct programmer_cfg *cfg)
{
char *param_str;
int dev_num = 0;
diff --git a/linux_spi.c b/linux_spi.c
index d65b3e8..b8ffa5d 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -164,7 +164,7 @@
return result;
}
-static int linux_spi_init(const struct programmer_cfg *cfg)
+static int linux_spi_init(struct programmer_cfg *cfg)
{
char *param_str, *endp;
uint32_t speed_hz = 2 * 1000 * 1000;
diff --git a/mediatek_i2c_spi.c b/mediatek_i2c_spi.c
index c15df05..eb233e2 100644
--- a/mediatek_i2c_spi.c
+++ b/mediatek_i2c_spi.c
@@ -483,7 +483,7 @@
return ret;
}
-static int mediatek_init(const struct programmer_cfg *cfg)
+static int mediatek_init(struct programmer_cfg *cfg)
{
int ret;
bool allow_brick;
diff --git a/mstarddc_spi.c b/mstarddc_spi.c
index bd65281..c62579c 100644
--- a/mstarddc_spi.c
+++ b/mstarddc_spi.c
@@ -150,7 +150,7 @@
};
/* Returns 0 upon success, a negative number upon errors. */
-static int mstarddc_spi_init(const struct programmer_cfg *cfg)
+static int mstarddc_spi_init(struct programmer_cfg *cfg)
{
int ret = 0;
int mstarddc_fd = -1;
diff --git a/ni845x_spi.c b/ni845x_spi.c
index fd5057d..2f83625 100644
--- a/ni845x_spi.c
+++ b/ni845x_spi.c
@@ -539,7 +539,7 @@
.probe_opcode = default_spi_probe_opcode,
};
-static int ni845x_spi_init(const struct programmer_cfg *cfg)
+static int ni845x_spi_init(struct programmer_cfg *cfg)
{
char *speed_str = NULL;
char *CS_str = NULL;
diff --git a/nic3com.c b/nic3com.c
index a578d48..1ed10cf 100644
--- a/nic3com.c
+++ b/nic3com.c
@@ -95,7 +95,7 @@
.shutdown = nic3com_shutdown,
};
-static int nic3com_init(const struct programmer_cfg *cfg)
+static int nic3com_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t io_base_addr = 0;
diff --git a/nicintel.c b/nicintel.c
index feb07b6..8671781 100644
--- a/nicintel.c
+++ b/nicintel.c
@@ -71,7 +71,7 @@
.shutdown = nicintel_shutdown,
};
-static int nicintel_init(const struct programmer_cfg *cfg)
+static int nicintel_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uintptr_t addr;
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index 80ccd88..99d0b1c 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -479,7 +479,7 @@
.shutdown = nicintel_ee_shutdown_i210,
};
-static int nicintel_ee_init(const struct programmer_cfg *cfg)
+static int nicintel_ee_init(struct programmer_cfg *cfg)
{
const struct opaque_master *mst;
uint32_t eec = 0;
diff --git a/nicintel_spi.c b/nicintel_spi.c
index 2821d23..80f7ecf 100644
--- a/nicintel_spi.c
+++ b/nicintel_spi.c
@@ -285,7 +285,7 @@
return 0;
}
-static int nicintel_spi_init(const struct programmer_cfg *cfg)
+static int nicintel_spi_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
diff --git a/nicnatsemi.c b/nicnatsemi.c
index 65377dc..ca04a5b 100644
--- a/nicnatsemi.c
+++ b/nicnatsemi.c
@@ -82,7 +82,7 @@
.shutdown = nicnatsemi_shutdown,
};
-static int nicnatsemi_init(const struct programmer_cfg *cfg)
+static int nicnatsemi_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t io_base_addr;
diff --git a/nicrealtek.c b/nicrealtek.c
index 5937e35..c81f839 100644
--- a/nicrealtek.c
+++ b/nicrealtek.c
@@ -91,7 +91,7 @@
.shutdown = nicrealtek_shutdown,
};
-static int nicrealtek_init(const struct programmer_cfg *cfg)
+static int nicrealtek_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t io_base_addr = 0;
diff --git a/ogp_spi.c b/ogp_spi.c
index d85c823..b17e8f2 100644
--- a/ogp_spi.c
+++ b/ogp_spi.c
@@ -107,7 +107,7 @@
return 0;
}
-static int ogp_spi_init(const struct programmer_cfg *cfg)
+static int ogp_spi_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
char *type;
diff --git a/parade_lspcon.c b/parade_lspcon.c
index a50346e..f8b5856 100644
--- a/parade_lspcon.c
+++ b/parade_lspcon.c
@@ -460,7 +460,7 @@
return ret;
}
-static int parade_lspcon_init(const struct programmer_cfg *cfg)
+static int parade_lspcon_init(struct programmer_cfg *cfg)
{
bool allow_brick;
diff --git a/pcidev.c b/pcidev.c
index 0b35944..2c1b1c8 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -257,7 +257,7 @@
* also matches the specified bus:device.function.
* For convenience, this function also registers its own undo handlers.
*/
-struct pci_dev *pcidev_init(const struct programmer_cfg *cfg, const struct dev_entry *devs, int bar)
+struct pci_dev *pcidev_init(struct programmer_cfg *cfg, const struct dev_entry *devs, int bar)
{
struct pci_dev *dev;
struct pci_dev *found_dev = NULL;
diff --git a/pickit2_spi.c b/pickit2_spi.c
index 86c5403..786d51d 100644
--- a/pickit2_spi.c
+++ b/pickit2_spi.c
@@ -387,7 +387,7 @@
.probe_opcode = default_spi_probe_opcode,
};
-static int pickit2_spi_init(const struct programmer_cfg *cfg)
+static int pickit2_spi_init(struct programmer_cfg *cfg)
{
uint8_t buf[CMD_LENGTH] = {
CMD_EXEC_SCRIPT,
diff --git a/pony_spi.c b/pony_spi.c
index 0647f91..6143e58 100644
--- a/pony_spi.c
+++ b/pony_spi.c
@@ -160,7 +160,7 @@
return ret;
}
-static int pony_spi_init(const struct programmer_cfg *cfg)
+static int pony_spi_init(struct programmer_cfg *cfg)
{
int i, data_out;
enum pony_type type;
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c
index d1a09d7..4f62605 100644
--- a/raiden_debug_spi.c
+++ b/raiden_debug_spi.c
@@ -1486,7 +1486,7 @@
dev = usb_device_free(dev);
}
-static int raiden_debug_spi_init(const struct programmer_cfg *cfg)
+static int raiden_debug_spi_init(struct programmer_cfg *cfg)
{
struct usb_match match;
char *serial = extract_programmer_param_str(cfg, "serial");
diff --git a/rayer_spi.c b/rayer_spi.c
index 27caf2b..28bcff3 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -296,7 +296,7 @@
return *prog ? 0 : -1;
}
-static int rayer_spi_init(const struct programmer_cfg *cfg)
+static int rayer_spi_init(struct programmer_cfg *cfg)
{
const struct rayer_programmer *prog;
struct rayer_pinout *pinout = NULL;
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c
index 2a5d5ed..99d35fd 100644
--- a/realtek_mst_i2c_spi.c
+++ b/realtek_mst_i2c_spi.c
@@ -492,7 +492,7 @@
return ret;
}
-static int realtek_mst_i2c_spi_init(const struct programmer_cfg *cfg)
+static int realtek_mst_i2c_spi_init(struct programmer_cfg *cfg)
{
int ret = 0;
bool reset, enter_isp, allow_brick;
diff --git a/satamv.c b/satamv.c
index fea4c2b..713daad 100644
--- a/satamv.c
+++ b/satamv.c
@@ -108,7 +108,7 @@
* 0xc08 PCI BAR2 (Flash/NVRAM) Control
* 0x1046c Flash Parameters
*/
-static int satamv_init(const struct programmer_cfg *cfg)
+static int satamv_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uintptr_t addr;
diff --git a/satasii.c b/satasii.c
index e881f96..ae3a9e6 100644
--- a/satasii.c
+++ b/satasii.c
@@ -99,7 +99,7 @@
.shutdown = satasii_shutdown,
};
-static int satasii_init(const struct programmer_cfg *cfg)
+static int satasii_init(struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
uint32_t addr;
diff --git a/serprog.c b/serprog.c
index 5ddbe3d..1f372f1 100644
--- a/serprog.c
+++ b/serprog.c
@@ -601,7 +601,7 @@
static enum chipbustype serprog_buses_supported = BUS_NONE;
-static int serprog_init(const struct programmer_cfg *cfg)
+static int serprog_init(struct programmer_cfg *cfg)
{
uint16_t iface;
unsigned char pgmname[17];
diff --git a/stlinkv3_spi.c b/stlinkv3_spi.c
index 16a66b4..7396d9d 100644
--- a/stlinkv3_spi.c
+++ b/stlinkv3_spi.c
@@ -473,7 +473,7 @@
.probe_opcode = default_spi_probe_opcode,
};
-static int stlinkv3_spi_init(const struct programmer_cfg *cfg)
+static int stlinkv3_spi_init(struct programmer_cfg *cfg)
{
uint16_t sck_freq_kHz = 1000; // selecting 1 MHz SCK is a good bet
char *param_str;
diff --git a/tests/tests.c b/tests/tests.c
index a1dcaca..70d072f 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -53,7 +53,7 @@
.device_id = NON_ZERO,
};
-struct pci_dev *__wrap_pcidev_init(const struct programmer_cfg *cfg, void *devs, int bar)
+struct pci_dev *__wrap_pcidev_init(struct programmer_cfg *cfg, void *devs, int bar)
{
LOG_ME;
return &mock_pci_dev;
diff --git a/usb_device.c b/usb_device.c
index b3c966c..d52d6c6 100644
--- a/usb_device.c
+++ b/usb_device.c
@@ -28,7 +28,7 @@
* Possibly extract a programmer parameter and use it to initialize the given
* match value structure.
*/
-static void usb_match_value_init(const struct programmer_cfg *cfg,
+static void usb_match_value_init(struct programmer_cfg *cfg,
struct usb_match_value *match,
char const *parameter)
{
@@ -49,7 +49,7 @@
#define USB_MATCH_VALUE_INIT(PPARAM, NAME) \
usb_match_value_init(PPARAM, &match->NAME, #NAME)
-void usb_match_init(const struct programmer_cfg *cfg, struct usb_match *match)
+void usb_match_init(struct programmer_cfg *cfg, struct usb_match *match)
{
USB_MATCH_VALUE_INIT(cfg, vid);
USB_MATCH_VALUE_INIT(cfg, pid);
diff --git a/usbblaster_spi.c b/usbblaster_spi.c
index 75d5be7..b1a9d01 100644
--- a/usbblaster_spi.c
+++ b/usbblaster_spi.c
@@ -176,7 +176,7 @@
};
/* Returns 0 upon success, a negative number upon errors. */
-static int usbblaster_spi_init(const struct programmer_cfg *cfg)
+static int usbblaster_spi_init(struct programmer_cfg *cfg)
{
uint8_t buf[BUF_SIZE + 1] = { 0 };
struct ftdi_context ftdic;
To view, visit change 71747. To unsubscribe, or for help writing mail filters, visit settings.