Tidy up the DISCARD hack
authorAlan Cox <alan@linux.intel.com>
Tue, 6 Jan 2015 21:34:50 +0000 (21:34 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 6 Jan 2015 21:34:50 +0000 (21:34 +0000)
Kernel/cpu-z80/cpu.h
Kernel/dev/devsd.c

index 183376a..6e1d0fd 100644 (file)
@@ -58,4 +58,5 @@ typedef union {            /* this structure is endian dependent */
 #define cpu_to_le16(x) (x)
 #define le16_to_cpu(x) (x)
 
+#define DISCARDABLE    static void DISCARDSEG(void) __naked { __asm .area _DISCARD __endasm; }
 #endif
index e8df58f..238c664 100644 (file)
@@ -174,7 +174,8 @@ static int sd_send_command(uint8_t drive, unsigned char cmd, uint32_t arg)
 /* in the DISCARD segment. sdcc only allows us to specify one segment for   */
 /* each source file. This "solution" is a bit (well, very) hacky ...        */
 /****************************************************************************/
-static void DISCARDSEG(void) __naked { __asm .area _DISCARD __endasm; }
+
+DISCARDABLE
 
 void devsd_init(void)
 {