programmer: Smoothen register_spi_master() API

It was impossible to register a const struct spi_master that would
point to dynamically allocated `data`. Fix that so that we won't
have to create more mutable globals.

Change-Id: I0c753b3db050fb87d4bbe2301a7ead854f28456f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/54066
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/bitbang_spi.c b/bitbang_spi.c
index d22b6fc..f319957 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -103,7 +103,7 @@
 
 	/* Cast away `const`, but local code must ensure it's still treated as such. */
 	mst.data = (struct bitbang_spi_master *)master;
-	register_spi_master(&mst);
+	register_spi_master(&mst, NULL);
 
 	/* Only mess with the bus if we're sure nobody else uses it. */
 	bitbang_spi_request_bus(master);