diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-08-16 23:37:23 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-08-16 23:37:23 +0000 |
commit | c76c568b351d37c485f78cd185b2d52d54fe7a34 (patch) | |
tree | ca65a23113fb82941855e44b5dcc3a0896885882 /firmware | |
parent | 8b131ac1fb04cb96094044dca7423a8d1da7f690 (diff) | |
download | rockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.tar.gz rockbox-c76c568b351d37c485f78cd185b2d52d54fe7a34.zip |
Const policed pointer arguments to functions, part 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4995 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/debug.c | 14 | ||||
-rw-r--r-- | firmware/drivers/lcd-player.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 4 | ||||
-rw-r--r-- | firmware/export/font.h | 2 | ||||
-rw-r--r-- | firmware/export/id3.h | 4 | ||||
-rw-r--r-- | firmware/export/kernel.h | 2 | ||||
-rw-r--r-- | firmware/export/lcd.h | 4 | ||||
-rw-r--r-- | firmware/export/mp3_playback.h | 2 | ||||
-rw-r--r-- | firmware/export/mpeg.h | 4 | ||||
-rw-r--r-- | firmware/export/panic.h | 2 | ||||
-rw-r--r-- | firmware/font.c | 12 | ||||
-rw-r--r-- | firmware/id3.c | 4 | ||||
-rw-r--r-- | firmware/kernel.c | 2 | ||||
-rw-r--r-- | firmware/mp3_playback.c | 2 | ||||
-rw-r--r-- | firmware/mpeg.c | 8 | ||||
-rw-r--r-- | firmware/panic.c | 2 | ||||
-rw-r--r-- | firmware/rolo.c | 10 | ||||
-rw-r--r-- | firmware/thread.c | 2 |
18 files changed, 42 insertions, 40 deletions
diff --git a/firmware/debug.c b/firmware/debug.c index 977ece3f5d..6a30c6076a 100644 --- a/firmware/debug.c +++ b/firmware/debug.c | |||
@@ -112,11 +112,11 @@ static char lowhex(int x) | |||
112 | return hexchars[x & 0xf]; | 112 | return hexchars[x & 0xf]; |
113 | } | 113 | } |
114 | 114 | ||
115 | static void putpacket (char *buffer) | 115 | static void putpacket (const char *buffer) |
116 | { | 116 | { |
117 | register int checksum; | 117 | register int checksum; |
118 | 118 | ||
119 | char *src = buffer; | 119 | const char *src = buffer; |
120 | 120 | ||
121 | /* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug | 121 | /* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug |
122 | stub from interrupting the message */ | 122 | stub from interrupting the message */ |
@@ -172,7 +172,7 @@ static void putpacket (char *buffer) | |||
172 | 172 | ||
173 | /* convert the memory, pointed to by mem into hex, placing result in buf */ | 173 | /* convert the memory, pointed to by mem into hex, placing result in buf */ |
174 | /* return a pointer to the last char put in buf (null) */ | 174 | /* return a pointer to the last char put in buf (null) */ |
175 | static char *mem2hex (char *mem, char *buf, int count) | 175 | static char *mem2hex (const char *mem, char *buf, int count) |
176 | { | 176 | { |
177 | int i; | 177 | int i; |
178 | int ch; | 178 | int ch; |
@@ -186,7 +186,7 @@ static char *mem2hex (char *mem, char *buf, int count) | |||
186 | return (buf); | 186 | return (buf); |
187 | } | 187 | } |
188 | 188 | ||
189 | static void debug(char *msg) | 189 | static void debug(const char *msg) |
190 | { | 190 | { |
191 | debugbuf[0] = 'O'; | 191 | debugbuf[0] = 'O'; |
192 | 192 | ||
@@ -196,7 +196,7 @@ static void debug(char *msg) | |||
196 | #endif /* end of DEBUG section */ | 196 | #endif /* end of DEBUG section */ |
197 | 197 | ||
198 | #ifdef __GNUC__ | 198 | #ifdef __GNUC__ |
199 | void debugf(char *fmt, ...) | 199 | void debugf(const char *fmt, ...) |
200 | #endif | 200 | #endif |
201 | { | 201 | { |
202 | #ifdef DEBUG | 202 | #ifdef DEBUG |
@@ -218,7 +218,7 @@ void debug_init(void) | |||
218 | { | 218 | { |
219 | } | 219 | } |
220 | 220 | ||
221 | void debugf(char *fmt, ...) | 221 | void debugf(const char *fmt, ...) |
222 | { | 222 | { |
223 | va_list ap; | 223 | va_list ap; |
224 | va_start( ap, fmt ); | 224 | va_start( ap, fmt ); |
@@ -226,7 +226,7 @@ void debugf(char *fmt, ...) | |||
226 | va_end( ap ); | 226 | va_end( ap ); |
227 | } | 227 | } |
228 | 228 | ||
229 | void ldebugf(char* file, int line, char *fmt, ...) | 229 | void ldebugf(const char* file, int line, const char *fmt, ...) |
230 | { | 230 | { |
231 | va_list ap; | 231 | va_list ap; |
232 | va_start( ap, fmt ); | 232 | va_start( ap, fmt ); |
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index c948f49828..d4a523afe3 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c | |||
@@ -530,7 +530,7 @@ void lcd_bidir_scroll(int percent) | |||
530 | bidir_limit = percent; | 530 | bidir_limit = percent; |
531 | } | 531 | } |
532 | 532 | ||
533 | void lcd_puts_scroll(int x, int y, unsigned char* string ) | 533 | void lcd_puts_scroll(int x, int y, const unsigned char* string ) |
534 | { | 534 | { |
535 | struct scrollinfo* s; | 535 | struct scrollinfo* s; |
536 | int i; | 536 | int i; |
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 42cf016f97..a8dca92b4f 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -784,12 +784,12 @@ void lcd_invertpixel(int x, int y) | |||
784 | INVERT_PIXEL(x,y); | 784 | INVERT_PIXEL(x,y); |
785 | } | 785 | } |
786 | 786 | ||
787 | void lcd_puts_scroll(int x, int y, unsigned char *string) | 787 | void lcd_puts_scroll(int x, int y, const unsigned char *string) |
788 | { | 788 | { |
789 | lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT); | 789 | lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT); |
790 | } | 790 | } |
791 | 791 | ||
792 | void lcd_puts_scroll_style(int x, int y, unsigned char *string, int style) | 792 | void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style) |
793 | { | 793 | { |
794 | struct scrollinfo* s; | 794 | struct scrollinfo* s; |
795 | int w, h; | 795 | int w, h; |
diff --git a/firmware/export/font.h b/firmware/export/font.h index f2f83e54c8..14a683a5f2 100644 --- a/firmware/export/font.h +++ b/firmware/export/font.h | |||
@@ -103,7 +103,7 @@ struct font { | |||
103 | 103 | ||
104 | /* font routines*/ | 104 | /* font routines*/ |
105 | void font_init(void); | 105 | void font_init(void); |
106 | struct font* font_load(char *path); | 106 | struct font* font_load(const char *path); |
107 | struct font* font_get(int font); | 107 | struct font* font_get(int font); |
108 | void font_reset(void); | 108 | void font_reset(void); |
109 | 109 | ||
diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 10f8002db6..8a79cb0ce1 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h | |||
@@ -74,7 +74,7 @@ enum { | |||
74 | ID3_VER_2_4 | 74 | ID3_VER_2_4 |
75 | }; | 75 | }; |
76 | 76 | ||
77 | bool mp3info(struct mp3entry *entry, char *filename, bool v1first); | 77 | bool mp3info(struct mp3entry *entry, const char *filename, bool v1first); |
78 | char* id3_get_genre(struct mp3entry* id3); | 78 | char* id3_get_genre(const struct mp3entry* id3); |
79 | 79 | ||
80 | #endif | 80 | #endif |
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h index 6e11baedf6..97994c41df 100644 --- a/firmware/export/kernel.h +++ b/firmware/export/kernel.h | |||
@@ -71,7 +71,7 @@ extern void queue_init(struct event_queue *q); | |||
71 | extern void queue_wait(struct event_queue *q, struct event *ev); | 71 | extern void queue_wait(struct event_queue *q, struct event *ev); |
72 | extern void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks); | 72 | extern void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks); |
73 | extern void queue_post(struct event_queue *q, int id, void *data); | 73 | extern void queue_post(struct event_queue *q, int id, void *data); |
74 | extern bool queue_empty(struct event_queue* q); | 74 | extern bool queue_empty(const struct event_queue* q); |
75 | extern int queue_broadcast(int id, void *data); | 75 | extern int queue_broadcast(int id, void *data); |
76 | 76 | ||
77 | extern void mutex_init(struct mutex *m); | 77 | extern void mutex_init(struct mutex *m); |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 6a7f8cf155..2a8a7ff0b1 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -35,8 +35,8 @@ extern void lcd_puts(int x, int y, const unsigned char *string); | |||
35 | extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); | 35 | extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); |
36 | extern void lcd_putc(int x, int y, unsigned short ch); | 36 | extern void lcd_putc(int x, int y, unsigned short ch); |
37 | 37 | ||
38 | extern void lcd_puts_scroll(int x, int y, unsigned char* string ); | 38 | extern void lcd_puts_scroll(int x, int y, const unsigned char* string ); |
39 | extern void lcd_puts_scroll_style(int x, int y, unsigned char* string, | 39 | extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, |
40 | int style); | 40 | int style); |
41 | extern void lcd_icon(int icon, bool enable); | 41 | extern void lcd_icon(int icon, bool enable); |
42 | extern void lcd_stop_scroll(void); | 42 | extern void lcd_stop_scroll(void); |
diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h index 9eb1d882ff..12ef734bfe 100644 --- a/firmware/export/mp3_playback.h +++ b/firmware/export/mp3_playback.h | |||
@@ -51,7 +51,7 @@ void demand_irq_enable(bool on); | |||
51 | 51 | ||
52 | /* new functions, exported to plugin API */ | 52 | /* new functions, exported to plugin API */ |
53 | void mp3_play_init(void); | 53 | void mp3_play_init(void); |
54 | void mp3_play_data(unsigned char* start, int size, | 54 | void mp3_play_data(const unsigned char* start, int size, |
55 | void (*get_more)(unsigned char** start, int* size) /* callback fn */ | 55 | void (*get_more)(unsigned char** start, int* size) /* callback fn */ |
56 | ); | 56 | ); |
57 | void mp3_play_pause(bool play); | 57 | void mp3_play_pause(bool play); |
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h index bf16a2ac73..3088dc5ffd 100644 --- a/firmware/export/mpeg.h +++ b/firmware/export/mpeg.h | |||
@@ -77,8 +77,8 @@ int mpeg_status(void); | |||
77 | #if defined(HAVE_MAS3587F) || defined(SIMULATOR) | 77 | #if defined(HAVE_MAS3587F) || defined(SIMULATOR) |
78 | void mpeg_init_recording(void); | 78 | void mpeg_init_recording(void); |
79 | void mpeg_init_playback(void); | 79 | void mpeg_init_playback(void); |
80 | void mpeg_record(char *filename); | 80 | void mpeg_record(const char *filename); |
81 | void mpeg_new_file(char *filename); | 81 | void mpeg_new_file(const char *filename); |
82 | void mpeg_set_recording_options(int frequency, int quality, | 82 | void mpeg_set_recording_options(int frequency, int quality, |
83 | int source, int channel_mode, | 83 | int source, int channel_mode, |
84 | bool editable, int prerecord_time); | 84 | bool editable, int prerecord_time); |
diff --git a/firmware/export/panic.h b/firmware/export/panic.h index 585f827927..fd63687606 100644 --- a/firmware/export/panic.h +++ b/firmware/export/panic.h | |||
@@ -20,6 +20,6 @@ | |||
20 | #ifndef __PANIC_H__ | 20 | #ifndef __PANIC_H__ |
21 | #define __PANIC_H__ | 21 | #define __PANIC_H__ |
22 | 22 | ||
23 | void panicf( char *fmt, ... ); | 23 | void panicf( const char *fmt, ... ); |
24 | 24 | ||
25 | #endif /* __PANIC_H__ */ | 25 | #endif /* __PANIC_H__ */ |
diff --git a/firmware/font.c b/firmware/font.c index f33490869a..343dd0b278 100644 --- a/firmware/font.c +++ b/firmware/font.c | |||
@@ -53,9 +53,9 @@ static unsigned char *freeptr = mbuf; | |||
53 | static unsigned char *fileptr; | 53 | static unsigned char *fileptr; |
54 | static unsigned char *eofptr; | 54 | static unsigned char *eofptr; |
55 | 55 | ||
56 | static void rotate_font_bits(struct font* pf); | 56 | static void rotate_font_bits(const struct font* pf); |
57 | static void rotleft(unsigned char *dst, | 57 | static void rotleft(unsigned char *dst, |
58 | bitmap_t *src, | 58 | const bitmap_t *src, |
59 | unsigned int width, | 59 | unsigned int width, |
60 | unsigned int height); | 60 | unsigned int height); |
61 | 61 | ||
@@ -120,7 +120,7 @@ void font_reset(void) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /* read and load font into incore font structure*/ | 122 | /* read and load font into incore font structure*/ |
123 | struct font* font_load(char *path) | 123 | struct font* font_load(const char *path) |
124 | { | 124 | { |
125 | int fd, filesize; | 125 | int fd, filesize; |
126 | unsigned short maxwidth, height, ascent, pad; | 126 | unsigned short maxwidth, height, ascent, pad; |
@@ -263,7 +263,7 @@ struct font* font_get(int font) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | /* convert font bitmap data inplace to rockbox format*/ | 265 | /* convert font bitmap data inplace to rockbox format*/ |
266 | static void rotate_font_bits(struct font* pf) | 266 | static void rotate_font_bits(const struct font* pf) |
267 | { | 267 | { |
268 | int i; | 268 | int i; |
269 | unsigned long defaultchar = pf->defaultchar - pf->firstchar; | 269 | unsigned long defaultchar = pf->defaultchar - pf->firstchar; |
@@ -305,8 +305,8 @@ static void rotate_font_bits(struct font* pf) | |||
305 | * Doing it this way keeps fonts in standard formats, | 305 | * Doing it this way keeps fonts in standard formats, |
306 | * as well as keeping Rockbox hw bitmap format. | 306 | * as well as keeping Rockbox hw bitmap format. |
307 | */ | 307 | */ |
308 | static void rotleft(unsigned char *dst, bitmap_t *src, unsigned int width, | 308 | static void rotleft(unsigned char *dst, const bitmap_t *src, |
309 | unsigned int height) | 309 | unsigned int width, unsigned int height) |
310 | { | 310 | { |
311 | unsigned int i,j; | 311 | unsigned int i,j; |
312 | unsigned int src_words; /* # words of input image*/ | 312 | unsigned int src_words; /* # words of input image*/ |
diff --git a/firmware/id3.c b/firmware/id3.c index 0a08fa0de8..4297c8ba70 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -77,7 +77,7 @@ static const char* const genres[] = { | |||
77 | "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall" | 77 | "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall" |
78 | }; | 78 | }; |
79 | 79 | ||
80 | char* id3_get_genre(struct mp3entry* id3) | 80 | char* id3_get_genre(const struct mp3entry* id3) |
81 | { | 81 | { |
82 | if( id3->genre_string ) | 82 | if( id3->genre_string ) |
83 | return id3->genre_string ; | 83 | return id3->genre_string ; |
@@ -799,7 +799,7 @@ static int getsonglength(int fd, struct mp3entry *entry) | |||
799 | * about an MP3 file and updates it's entry accordingly. | 799 | * about an MP3 file and updates it's entry accordingly. |
800 | * | 800 | * |
801 | */ | 801 | */ |
802 | bool mp3info(struct mp3entry *entry, char *filename, bool v1first) | 802 | bool mp3info(struct mp3entry *entry, const char *filename, bool v1first) |
803 | { | 803 | { |
804 | int fd; | 804 | int fd; |
805 | int v1found = false; | 805 | int v1found = false; |
diff --git a/firmware/kernel.c b/firmware/kernel.c index ec2c149cc5..2cb87ccbc9 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -126,7 +126,7 @@ void queue_post(struct event_queue *q, int id, void *data) | |||
126 | set_irq_level(oldlevel); | 126 | set_irq_level(oldlevel); |
127 | } | 127 | } |
128 | 128 | ||
129 | bool queue_empty(struct event_queue* q) | 129 | bool queue_empty(const struct event_queue* q) |
130 | { | 130 | { |
131 | return ( q->read == q->write ); | 131 | return ( q->read == q->write ); |
132 | } | 132 | } |
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c index 1d4f77bf41..8159c4504c 100644 --- a/firmware/mp3_playback.c +++ b/firmware/mp3_playback.c | |||
@@ -1059,7 +1059,7 @@ void mp3_play_init(void) | |||
1059 | mp3_reset_playtime(); | 1059 | mp3_reset_playtime(); |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | void mp3_play_data(unsigned char* start, int size, | 1062 | void mp3_play_data(const unsigned char* start, int size, |
1063 | void (*get_more)(unsigned char** start, int* size) /* callback fn */ | 1063 | void (*get_more)(unsigned char** start, int* size) /* callback fn */ |
1064 | ) | 1064 | ) |
1065 | { | 1065 | { |
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index c6afbd8e6c..bfcdfc1c0c 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -803,7 +803,7 @@ static void transfer_end(unsigned char** ppbuf, int* psize) | |||
803 | wake_up_thread(); | 803 | wake_up_thread(); |
804 | } | 804 | } |
805 | 805 | ||
806 | static int add_track_to_tag_list(char *filename) | 806 | static int add_track_to_tag_list(const char *filename) |
807 | { | 807 | { |
808 | struct id3tag *t = NULL; | 808 | struct id3tag *t = NULL; |
809 | int i; | 809 | int i; |
@@ -938,7 +938,7 @@ static void track_change(void) | |||
938 | } | 938 | } |
939 | 939 | ||
940 | #ifdef DEBUG | 940 | #ifdef DEBUG |
941 | void hexdump(unsigned char *buf, int len) | 941 | void hexdump(const unsigned char *buf, int len) |
942 | { | 942 | { |
943 | int i; | 943 | int i; |
944 | 944 | ||
@@ -2167,7 +2167,7 @@ static void init_recording(void) | |||
2167 | call mpeg_set_recording_options(). */ | 2167 | call mpeg_set_recording_options(). */ |
2168 | } | 2168 | } |
2169 | 2169 | ||
2170 | void mpeg_record(char *filename) | 2170 | void mpeg_record(const char *filename) |
2171 | { | 2171 | { |
2172 | mpeg_errno = 0; | 2172 | mpeg_errno = 0; |
2173 | 2173 | ||
@@ -2396,7 +2396,7 @@ void mpeg_set_recording_gain(int left, int right, bool use_mic) | |||
2396 | 0x0007); | 2396 | 0x0007); |
2397 | } | 2397 | } |
2398 | 2398 | ||
2399 | void mpeg_new_file(char *filename) | 2399 | void mpeg_new_file(const char *filename) |
2400 | { | 2400 | { |
2401 | mpeg_errno = 0; | 2401 | mpeg_errno = 0; |
2402 | 2402 | ||
diff --git a/firmware/panic.c b/firmware/panic.c index df8afdfda3..147ee6292e 100644 --- a/firmware/panic.c +++ b/firmware/panic.c | |||
@@ -31,7 +31,7 @@ static char panic_buf[128]; | |||
31 | /* | 31 | /* |
32 | * "Dude. This is pretty fucked-up, right here." | 32 | * "Dude. This is pretty fucked-up, right here." |
33 | */ | 33 | */ |
34 | void panicf( char *fmt, ...) | 34 | void panicf( const char *fmt, ...) |
35 | { | 35 | { |
36 | va_list ap; | 36 | va_list ap; |
37 | 37 | ||
diff --git a/firmware/rolo.c b/firmware/rolo.c index c5cfc5d77b..d78078cdd7 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #define IRQ0_EDGE_TRIGGER 0x80 | 31 | #define IRQ0_EDGE_TRIGGER 0x80 |
32 | 32 | ||
33 | static void rolo_error(char *text) | 33 | static void rolo_error(const char *text) |
34 | { | 34 | { |
35 | lcd_clear_display(); | 35 | lcd_clear_display(); |
36 | lcd_puts(0, 0, "ROLO error:"); | 36 | lcd_puts(0, 0, "ROLO error:"); |
@@ -43,8 +43,10 @@ static void rolo_error(char *text) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | /* these are in assembler file "descramble.S" */ | 45 | /* these are in assembler file "descramble.S" */ |
46 | extern unsigned short descramble(unsigned char* source, unsigned char* dest, int length); | 46 | extern unsigned short descramble(const unsigned char* source, |
47 | extern void rolo_restart(unsigned char* source, unsigned char* dest, int length); | 47 | unsigned char* dest, int length); |
48 | extern void rolo_restart(const unsigned char* source, unsigned char* dest, | ||
49 | int length); | ||
48 | 50 | ||
49 | /*************************************************************************** | 51 | /*************************************************************************** |
50 | * | 52 | * |
@@ -52,7 +54,7 @@ extern void rolo_restart(unsigned char* source, unsigned char* dest, int length) | |||
52 | * Filename must be a fully defined filename including the path and extension | 54 | * Filename must be a fully defined filename including the path and extension |
53 | * | 55 | * |
54 | ***************************************************************************/ | 56 | ***************************************************************************/ |
55 | int rolo_load(char* filename) | 57 | int rolo_load(const char* filename) |
56 | { | 58 | { |
57 | int fd; | 59 | int fd; |
58 | unsigned long length; | 60 | unsigned long length; |
diff --git a/firmware/thread.c b/firmware/thread.c index 7490833863..df90c7ac2f 100644 --- a/firmware/thread.c +++ b/firmware/thread.c | |||
@@ -71,7 +71,7 @@ static inline void store_context(void* addr) | |||
71 | * Load non-volatile context. | 71 | * Load non-volatile context. |
72 | *--------------------------------------------------------------------------- | 72 | *--------------------------------------------------------------------------- |
73 | */ | 73 | */ |
74 | static inline void load_context(void* addr) | 74 | static inline void load_context(const void* addr) |
75 | { | 75 | { |
76 | asm volatile ("mov.l @%0+,r8\n\t" | 76 | asm volatile ("mov.l @%0+,r8\n\t" |
77 | "mov.l @%0+,r9\n\t" | 77 | "mov.l @%0+,r9\n\t" |