m68k: amiga: Add and use "amiga.h"

When building with W=1:

    arch/m68k/amiga/amisound.c:48:13: warning: no previous prototype for ‘amiga_init_sound’ [-Wmissing-prototypes]
       48 | void __init amiga_init_sound(void)
	  |             ^~~~~~~~~~~~~~~~
    arch/m68k/amiga/amisound.c:71:6: warning: no previous prototype for ‘amiga_mksound’ [-Wmissing-prototypes]
       71 | void amiga_mksound( unsigned int hz, unsigned int ticks )
	  |      ^~~~~~~~~~~~~

Fix this by introducing a new header file "amiga.h" for holding the
prototypes of functions implemented in arch/m68k/amiga/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/7e9395e1de1c9a34d16ea40a522057f05bbee400.1694613528.git.geert@linux-m68k.org
This commit is contained in:
Geert Uytterhoeven 2023-09-13 16:08:07 +02:00
parent ac0b559132
commit 090c65639a
3 changed files with 9 additions and 2 deletions

5
arch/m68k/amiga/amiga.h Normal file
View File

@ -0,0 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* amisound.c */
void amiga_init_sound(void);
void amiga_mksound(unsigned int hz, unsigned int ticks);

View File

@ -16,6 +16,8 @@
#include <asm/amigahw.h>
#include "amiga.h"
static unsigned short *snd_data;
static const signed char sine_data[] = {
0, 39, 75, 103, 121, 127, 121, 103, 75, 39,

View File

@ -39,6 +39,8 @@
#include <asm/io.h>
#include <asm/config.h>
#include "amiga.h"
static unsigned long amiga_model;
unsigned long amiga_eclock;
@ -96,9 +98,7 @@ static char amiga_model_name[13] = "Amiga ";
static void amiga_sched_init(void);
static void amiga_get_model(char *model);
static void amiga_get_hardware_list(struct seq_file *m);
extern void amiga_mksound(unsigned int count, unsigned int ticks);
static void amiga_reset(void);
extern void amiga_init_sound(void);
static void amiga_mem_console_write(struct console *co, const char *b,
unsigned int count);
#ifdef CONFIG_HEARTBEAT