diff --git a/flash.h b/flash.h
index ad7c91b..f310e23 100644
--- a/flash.h
+++ b/flash.h
@@ -169,14 +169,6 @@
 	unsigned int page_size;
 	int feature_bits;
 
-	/* set of function pointers to use in 4-bytes addressing mode */
-	struct four_bytes_addr_funcs_set {
-		int (*set_4ba) (struct flashctx *flash);
-		int (*read_nbyte) (struct flashctx *flash, unsigned int addr, uint8_t *bytes, unsigned int len);
-		int (*program_byte) (struct flashctx *flash, unsigned int addr, const uint8_t databyte);
-		int (*program_nbyte) (struct flashctx *flash, unsigned int addr, const uint8_t *bytes, unsigned int len);
-	} four_bytes_addr_funcs;
-
 	/* Indicate how well flashrom supports different operations of this flash chip. */
 	struct tested {
 		enum test_state probe;
@@ -213,6 +205,7 @@
 	int (*unlock) (struct flashctx *flash);
 	int (*write) (struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
 	int (*read) (struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
+	int (*set_4ba) (struct flashctx *flash);
 	struct voltage {
 		uint16_t min;
 		uint16_t max;
diff --git a/flashchips.c b/flashchips.c
index 4bf71c5..439c05f 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -8135,13 +8135,6 @@
 		.page_size	= 256,
 		/* OTP: 512B total; enter 0xB1, exit 0xC1 */
 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_SUPPORT,
-		.four_bytes_addr_funcs =
-		{
-			.set_4ba = spi_enter_4ba_b7, /* enter 4-bytes addressing mode by CMD B7 */
-			.read_nbyte = spi_nbyte_read_4ba,  /* read from 4-bytes addressing mode */
-			.program_byte = spi_byte_program_4ba, /* write from 4-bytes addressing mode */
-			.program_nbyte = spi_nbyte_program_4ba /* write from 4-bytes addressing mode */
-		},
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_spi_rdid,
 		.probe_timing	= TIMING_ZERO,
@@ -8149,13 +8142,13 @@
 		{
 			{
 				.eraseblocks = { {4 * 1024, 8192} },
-				.block_erase = spi_block_erase_20_4ba,
+				.block_erase = spi_block_erase_20,
 			}, {
 				.eraseblocks = { {32 * 1024, 1024} },
-				.block_erase = spi_block_erase_52_4ba,
+				.block_erase = spi_block_erase_52,
 			}, {
 				.eraseblocks = { {64 * 1024, 512} },
-				.block_erase = spi_block_erase_d8_4ba,
+				.block_erase = spi_block_erase_d8,
 			}, {
 				.eraseblocks = { {32 * 1024 * 1024, 1} },
 				.block_erase = spi_block_erase_60,
@@ -8169,6 +8162,7 @@
 		.unlock		= spi_disable_blockprotect_bp3_srwd,
 		.write		= spi_chip_write_256,
 		.read		= spi_chip_read, /* Fast read (0x0B) supported */
+		.set_4ba	= spi_enter_4ba_b7,
 		.voltage	= {2700, 3600},
 	},
 
@@ -8182,13 +8176,6 @@
 		.page_size	= 256,
 		/* OTP: 512B total; enter 0xB1, exit 0xC1 */
 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_SUPPORT,
-		.four_bytes_addr_funcs =
-		{
-			.set_4ba = spi_enter_4ba_b7, /* enter 4-bytes addressing mode by CMD B7 */
-			.read_nbyte = spi_nbyte_read_4ba,  /* read from 4-bytes addressing mode */
-			.program_byte = spi_byte_program_4ba, /* write from 4-bytes addressing mode */
-			.program_nbyte = spi_nbyte_program_4ba /* write from 4-bytes addressing mode */
-		},
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_spi_rdid,
 		.probe_timing	= TIMING_ZERO,
@@ -8196,13 +8183,13 @@
 		{
 			{
 				.eraseblocks = { {4 * 1024, 16384} },
-				.block_erase = spi_block_erase_20_4ba,
+				.block_erase = spi_block_erase_20,
 			}, {
 				.eraseblocks = { {32 * 1024, 2048} },
-				.block_erase = spi_block_erase_52_4ba,
+				.block_erase = spi_block_erase_52,
 			}, {
 				.eraseblocks = { {64 * 1024, 1024} },
-				.block_erase = spi_block_erase_d8_4ba,
+				.block_erase = spi_block_erase_d8,
 			}, {
 				.eraseblocks = { {64 * 1024 * 1024, 1} },
 				.block_erase = spi_block_erase_60,
@@ -8216,6 +8203,7 @@
 		.unlock		= spi_disable_blockprotect_bp3_srwd,
 		.write		= spi_chip_write_256,
 		.read		= spi_chip_read, /* Fast read (0x0B) supported */
+		.set_4ba	= spi_enter_4ba_b7,
 		.voltage	= {2700, 3600},
 	},
 
@@ -9929,12 +9917,6 @@
 		/* supports SFDP */
 		/* OTP: 64B total; read 0x4B, write 0x42 */
 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_SUPPORT | FEATURE_4BA_READ | FEATURE_4BA_WRITE,
-		.four_bytes_addr_funcs =
-		{
-			.read_nbyte = spi_nbyte_read_4ba_direct,
-			.program_byte = spi_byte_program_4ba_direct,
-			.program_nbyte = spi_nbyte_program_4ba_direct
-		},
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_spi_rdid,
 		.probe_timing	= TIMING_ZERO,
@@ -9968,12 +9950,6 @@
 		/* supports SFDP */
 		/* OTP: 64B total; read 0x4B, write 0x42 */
 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_SUPPORT | FEATURE_4BA_READ | FEATURE_4BA_WRITE,
-		.four_bytes_addr_funcs =
-		{
-			.read_nbyte = spi_nbyte_read_4ba_direct,
-			.program_byte = spi_byte_program_4ba_direct,
-			.program_nbyte = spi_nbyte_program_4ba_direct
-		},
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_spi_rdid,
 		.probe_timing	= TIMING_ZERO,
@@ -14852,13 +14828,6 @@
 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
 		/* FOUR_BYTE_ADDR: supports 4-bytes addressing mode */
 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_SUPPORT | FEATURE_4BA_READ,
-		.four_bytes_addr_funcs =
-		{
-			.set_4ba = spi_enter_4ba_b7_we, /* enter 4-bytes addressing mode by CMD B7 + WREN */
-			.read_nbyte = spi_nbyte_read_4ba_direct, /* read directly from any mode, no need to enter 4ba */
-			.program_byte = spi_byte_program_4ba, /* write from 4-bytes addressing mode */
-			.program_nbyte = spi_nbyte_program_4ba /* write from 4-bytes addressing mode */
-		},
 		.tested		= TEST_OK_PREW,
 		.probe		= probe_spi_rdid,
 		.probe_timing	= TIMING_ZERO,
@@ -14866,13 +14835,13 @@
 		{
 			{
 				.eraseblocks = { {4 * 1024, 8192} },
-				.block_erase = spi_block_erase_20_4ba, /* erases 4k from 4-bytes addressing mode */
+				.block_erase = spi_block_erase_20,
 			}, {
 				.eraseblocks = { {32 * 1024, 1024} },
-				.block_erase = spi_block_erase_52_4ba, /* erases 32k from 4-bytes addressing mode */
+				.block_erase = spi_block_erase_52,
 			}, {
 				.eraseblocks = { {64 * 1024, 512} },
-				.block_erase = spi_block_erase_d8_4ba, /* erases 64k from 4-bytes addressing mode */
+				.block_erase = spi_block_erase_d8,
 			}, {
 				.eraseblocks = { {32 * 1024 * 1024, 1} },
 				.block_erase = spi_block_erase_60,
@@ -14885,6 +14854,7 @@
 		.unlock		= spi_disable_blockprotect,
 		.write		= spi_chip_write_256,
 		.read		= spi_chip_read,
+		.set_4ba	= spi_enter_4ba_b7_we,
 		.voltage	= {2700, 3600},
 	},
 
diff --git a/flashrom.c b/flashrom.c
index 8849f63..9cc1be6 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -2219,9 +2219,8 @@
 	flash->in_4ba_mode = false;
 
 	/* Enable/disable 4-byte addressing mode if flash chip supports it */
-	if ((flash->chip->feature_bits & FEATURE_4BA_SUPPORT) &&
-	    flash->chip->four_bytes_addr_funcs.set_4ba) {
-		if (flash->chip->four_bytes_addr_funcs.set_4ba(flash)) {
+	if ((flash->chip->feature_bits & FEATURE_4BA_SUPPORT) && flash->chip->set_4ba) {
+		if (flash->chip->set_4ba(flash)) {
 			msg_cerr("Enabling/disabling 4-byte addressing mode failed!\n");
 			return 1;
 		}
diff --git a/spi25.c b/spi25.c
index ce3d184..1da7d53 100644
--- a/spi25.c
+++ b/spi25.c
@@ -652,10 +652,7 @@
 		lenhere = min(start + len, (i + 1) * area_size) - starthere;
 		for (j = 0; j < lenhere; j += chunksize) {
 			toread = min(chunksize, lenhere - j);
-			rc = (flash->chip->feature_bits & FEATURE_4BA_SUPPORT) == 0
-				? spi_nbyte_read(flash, starthere + j, buf + starthere - start + j, toread)
-				: flash->chip->four_bytes_addr_funcs.read_nbyte(flash, starthere + j,
-					buf + starthere - start + j, toread);
+			rc = spi_nbyte_read(flash, starthere + j, buf + starthere - start + j, toread);
 			if (rc)
 				break;
 		}
@@ -674,7 +671,6 @@
 int spi_write_chunked(struct flashctx *flash, const uint8_t *buf, unsigned int start,
 		      unsigned int len, unsigned int chunksize)
 {
-	int rc = 0;
 	unsigned int i, j, starthere, lenhere, towrite;
 	/* FIXME: page_size is the wrong variable. We need max_writechunk_size
 	 * in struct flashctx to do this properly. All chips using
@@ -699,21 +695,16 @@
 		/* Length of bytes in the range in this page. */
 		lenhere = min(start + len, (i + 1) * page_size) - starthere;
 		for (j = 0; j < lenhere; j += chunksize) {
+			int rc;
+
 			towrite = min(chunksize, lenhere - j);
-			rc = (flash->chip->feature_bits & FEATURE_4BA_SUPPORT) == 0
-				? spi_nbyte_program(flash, starthere + j, buf + starthere - start + j, towrite)
-				: flash->chip->four_bytes_addr_funcs.program_nbyte(flash, starthere + j,
-					buf + starthere - start + j, towrite);
+			rc = spi_nbyte_program(flash, starthere + j, buf + starthere - start + j, towrite);
 			if (rc)
-				break;
-			while (spi_read_status_register(flash) & SPI_SR_WIP)
-				programmer_delay(10);
+				return rc;
 		}
-		if (rc)
-			break;
 	}
 
-	return rc;
+	return 0;
 }
 
 /*
@@ -726,18 +717,11 @@
 int spi_chip_write_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
 {
 	unsigned int i;
-	int result = 0;
 
 	for (i = start; i < start + len; i++) {
-		result = (flash->chip->feature_bits & FEATURE_4BA_SUPPORT) == 0
-			? spi_nbyte_program(flash, i, buf + i - start, 1)
-			: flash->chip->four_bytes_addr_funcs.program_byte(flash, i, buf[i - start]);
-		if (result)
+		if (spi_nbyte_program(flash, i, buf + i - start, 1))
 			return 1;
-		while (spi_read_status_register(flash) & SPI_SR_WIP)
-			programmer_delay(10);
 	}
-
 	return 0;
 }
 
