diff --git a/am29f040b.c b/am29f040b.c
index 1f08e77..7b11e25 100644
--- a/am29f040b.c
+++ b/am29f040b.c
@@ -20,8 +20,7 @@
 
 #include "flash.h"
 
-static __inline__ int erase_sector_29f040b(chipaddr bios,
-					   unsigned long address)
+static int erase_sector_29f040b(chipaddr bios, unsigned long address)
 {
 	chip_writeb(0xAA, bios + 0x555);
 	chip_writeb(0x55, bios + 0x2AA);
@@ -38,10 +37,8 @@
 	return 0;
 }
 
-static __inline__ int write_sector_29f040b(chipaddr bios,
-					   uint8_t *src,
-					   chipaddr dst,
-					   unsigned int page_size)
+static int write_sector_29f040b(chipaddr bios, uint8_t *src, chipaddr dst,
+				unsigned int page_size)
 {
 	int i;
 
diff --git a/flash.h b/flash.h
index 31f4bfd..671f1a1 100644
--- a/flash.h
+++ b/flash.h
@@ -104,55 +104,17 @@
 
 extern const struct programmer_entry programmer_table[];
 
-static inline int programmer_init(void)
-{
-	return programmer_table[programmer].init();
-}
-
-static inline int programmer_shutdown(void)
-{
-	return programmer_table[programmer].shutdown();
-}
-
-static inline void *programmer_map_flash_region(const char *descr, unsigned long phys_addr, size_t len)
-{
-	return programmer_table[programmer].map_flash_region(descr, phys_addr, len);
-}
-
-static inline void programmer_unmap_flash_region(void *virt_addr, size_t len)
-{
-	programmer_table[programmer].unmap_flash_region(virt_addr, len);
-}
-
-static inline void chip_writeb(uint8_t val, chipaddr addr)
-{
-	programmer_table[programmer].chip_writeb(val, addr);
-}
-
-static inline void chip_writew(uint16_t val, chipaddr addr)
-{
-	programmer_table[programmer].chip_writew(val, addr);
-}
-
-static inline void chip_writel(uint32_t val, chipaddr addr)
-{
-	programmer_table[programmer].chip_writel(val, addr);
-}
-
-static inline uint8_t chip_readb(const chipaddr addr)
-{
-	return programmer_table[programmer].chip_readb(addr);
-}
-
-static inline uint16_t chip_readw(const chipaddr addr)
-{
-	return programmer_table[programmer].chip_readw(addr);
-}
-
-static inline uint32_t chip_readl(const chipaddr addr)
-{
-	return programmer_table[programmer].chip_readl(addr);
-}
+int programmer_init(void);
+int programmer_shutdown(void);
+void *programmer_map_flash_region(const char *descr, unsigned long phys_addr,
+				  size_t len);
+void programmer_unmap_flash_region(void *virt_addr, size_t len);
+void chip_writeb(uint8_t val, chipaddr addr);
+void chip_writew(uint16_t val, chipaddr addr);
+void chip_writel(uint32_t val, chipaddr addr);
+uint8_t chip_readb(const chipaddr addr);
+uint16_t chip_readw(const chipaddr addr);
+uint32_t chip_readl(const chipaddr addr);
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
diff --git a/flashrom.c b/flashrom.c
index 116d55c..cd16d71 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -77,6 +77,58 @@
 	{},
 };
 
+int programmer_init(void)
+{
+	return programmer_table[programmer].init();
+}
+
+int programmer_shutdown(void)
+{
+	return programmer_table[programmer].shutdown();
+}
+
+void *programmer_map_flash_region(const char *descr, unsigned long phys_addr,
+				  size_t len)
+{
+	return programmer_table[programmer].map_flash_region(descr,
+							     phys_addr, len);
+}
+
+void programmer_unmap_flash_region(void *virt_addr, size_t len)
+{
+	programmer_table[programmer].unmap_flash_region(virt_addr, len);
+}
+
+void chip_writeb(uint8_t val, chipaddr addr)
+{
+	programmer_table[programmer].chip_writeb(val, addr);
+}
+
+void chip_writew(uint16_t val, chipaddr addr)
+{
+	programmer_table[programmer].chip_writew(val, addr);
+}
+
+void chip_writel(uint32_t val, chipaddr addr)
+{
+	programmer_table[programmer].chip_writel(val, addr);
+}
+
+uint8_t chip_readb(const chipaddr addr)
+{
+	return programmer_table[programmer].chip_readb(addr);
+}
+
+uint16_t chip_readw(const chipaddr addr)
+{
+	return programmer_table[programmer].chip_readw(addr);
+}
+
+uint32_t chip_readl(const chipaddr addr)
+{
+	return programmer_table[programmer].chip_readl(addr);
+}
+
 void map_flash_registers(struct flashchip *flash)
 {
 	size_t size = flash->total_size * 1024;
diff --git a/ichspi.c b/ichspi.c
index f53b31f..4ddf2ad 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -127,14 +127,14 @@
 static OPCODES *curopcodes = NULL;
 
 /* HW access functions */
-static inline uint32_t REGREAD32(int X)
+static uint32_t REGREAD32(int X)
 {
 	volatile uint32_t regval;
 	regval = *(volatile uint32_t *)((uint8_t *) spibar + X);
 	return regval;
 }
 
-static inline uint16_t REGREAD16(int X)
+static uint16_t REGREAD16(int X)
 {
 	volatile uint16_t regval;
 	regval = *(volatile uint16_t *)((uint8_t *) spibar + X);
@@ -146,8 +146,8 @@
 #define REGWRITE8(X,Y)  (*(uint8_t *)((uint8_t *)spibar+X)=Y)
 
 /* Common SPI functions */
-static inline int find_opcode(OPCODES *op, uint8_t opcode);
-static inline int find_preop(OPCODES *op, uint8_t preop);
+static int find_opcode(OPCODES *op, uint8_t opcode);
+static int find_preop(OPCODES *op, uint8_t preop);
 static int generate_opcodes(OPCODES * op);
 static int program_opcodes(OPCODES * op);
 static int run_opcode(OPCODE op, uint32_t offset,
@@ -192,7 +192,7 @@
 
 OPCODES O_EXISTING = {};
 
-static inline int find_opcode(OPCODES *op, uint8_t opcode)
+static int find_opcode(OPCODES *op, uint8_t opcode)
 {
 	int a;
 
@@ -204,7 +204,7 @@
 	return -1;
 }
 
-static inline int find_preop(OPCODES *op, uint8_t preop)
+static int find_preop(OPCODES *op, uint8_t preop)
 {
 	int a;
 
diff --git a/sst28sf040.c b/sst28sf040.c
index 806497a..c858f54 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -28,7 +28,7 @@
 #define RESET			0xFF
 #define READ_ID			0x90
 
-static __inline__ void protect_28sf040(chipaddr bios)
+static void protect_28sf040(chipaddr bios)
 {
 	uint8_t tmp;
 
@@ -41,7 +41,7 @@
 	tmp = chip_readb(bios + 0x040A);
 }
 
-static __inline__ void unprotect_28sf040(chipaddr bios)
+static void unprotect_28sf040(chipaddr bios)
 {
 	uint8_t tmp;
 
@@ -54,8 +54,7 @@
 	tmp = chip_readb(bios + 0x041A);
 }
 
-static __inline__ int erase_sector_28sf040(chipaddr bios,
-					   unsigned long address)
+static int erase_sector_28sf040(chipaddr bios, unsigned long address)
 {
 	chip_writeb(AUTO_PG_ERASE1, bios);
 	chip_writeb(AUTO_PG_ERASE2, bios + address);
@@ -66,10 +65,8 @@
 	return 0;
 }
 
-static __inline__ int write_sector_28sf040(chipaddr bios,
-					   uint8_t *src,
-					   chipaddr dst,
-					   unsigned int page_size)
+static int write_sector_28sf040(chipaddr bios, uint8_t *src, chipaddr dst,
+				unsigned int page_size)
 {
 	int i;
 
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index 896564f..d9dcd9b 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -38,8 +38,8 @@
 #define	STATUS_ESS		(1 << 6)
 #define	STATUS_WSMS		(1 << 7)
 
-static __inline__ int write_lockbits_49lfxxxc(chipaddr bios, int size,
-					      unsigned char bits)
+static int write_lockbits_49lfxxxc(chipaddr bios, int size,
+				   unsigned char bits)
 {
 	int i, left = size;
 	unsigned long address;
@@ -65,8 +65,7 @@
 	return 0;
 }
 
-static __inline__ int erase_sector_49lfxxxc(chipaddr bios,
-					    unsigned long address)
+static int erase_sector_49lfxxxc(chipaddr bios, unsigned long address)
 {
 	unsigned char status;
 
@@ -85,10 +84,8 @@
 	return 0;
 }
 
-static __inline__ int write_sector_49lfxxxc(chipaddr bios,
-					    uint8_t *src,
-					    chipaddr dst,
-					    unsigned int page_size)
+static int write_sector_49lfxxxc(chipaddr bios, uint8_t *src, chipaddr dst,
+				 unsigned int page_size)
 {
 	int i;
 	unsigned char status;
