aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:09:05 -0500
commit639074354bb371feb2dde409b2ce05d56afef02b (patch)
tree2524111d2bc4531e3cbd280f1b02d656b41c41d4
parent0c79358b874af31430cf8d26540ae7b8713505f6 (diff)
[PATCH] m68k: kill mach_floppy_setup, convert to proper __setup() in drivers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/m68k/amiga/config.c6
-rw-r--r--arch/m68k/atari/config.c6
-rw-r--r--arch/m68k/kernel/setup.c13
-rw-r--r--arch/m68k/q40/config.c2
-rw-r--r--arch/ppc/amiga/config.c6
-rw-r--r--arch/ppc/platforms/apus_setup.c14
-rw-r--r--drivers/block/amiflop.c20
-rw-r--r--drivers/block/ataflop.c18
-rw-r--r--include/asm-m68k/machdep.h1
-rw-r--r--include/asm-m68knommu/machdep.h1
10 files changed, 28 insertions, 59 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index 8eadde9d2a8f..12e3706fe02c 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -105,9 +105,6 @@ static int a2000_hwclk (int, struct rtc_time *);
105static int amiga_set_clock_mmss (unsigned long); 105static int amiga_set_clock_mmss (unsigned long);
106static unsigned int amiga_get_ss (void); 106static unsigned int amiga_get_ss (void);
107extern void amiga_mksound( unsigned int count, unsigned int ticks ); 107extern void amiga_mksound( unsigned int count, unsigned int ticks );
108#ifdef CONFIG_AMIGA_FLOPPY
109extern void amiga_floppy_setup(char *, int *);
110#endif
111static void amiga_reset (void); 108static void amiga_reset (void);
112extern void amiga_init_sound(void); 109extern void amiga_init_sound(void);
113static void amiga_savekmsg_init(void); 110static void amiga_savekmsg_init(void);
@@ -427,9 +424,6 @@ void __init config_amiga(void)
427 424
428 mach_set_clock_mmss = amiga_set_clock_mmss; 425 mach_set_clock_mmss = amiga_set_clock_mmss;
429 mach_get_ss = amiga_get_ss; 426 mach_get_ss = amiga_get_ss;
430#ifdef CONFIG_AMIGA_FLOPPY
431 mach_floppy_setup = amiga_floppy_setup;
432#endif
433 mach_reset = amiga_reset; 427 mach_reset = amiga_reset;
434#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 428#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
435 mach_beep = amiga_mksound; 429 mach_beep = amiga_mksound;
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index f6d266b5cc76..1012b08e5522 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -52,9 +52,6 @@ int atari_rtc_year_offset;
52 52
53/* local function prototypes */ 53/* local function prototypes */
54static void atari_reset( void ); 54static void atari_reset( void );
55#ifdef CONFIG_ATARI_FLOPPY
56extern void atari_floppy_setup(char *, int *);
57#endif
58static void atari_get_model(char *model); 55static void atari_get_model(char *model);
59static int atari_get_hardware_list(char *buffer); 56static int atari_get_hardware_list(char *buffer);
60 57
@@ -244,9 +241,6 @@ void __init config_atari(void)
244 mach_get_irq_list = show_atari_interrupts; 241 mach_get_irq_list = show_atari_interrupts;
245 mach_gettimeoffset = atari_gettimeoffset; 242 mach_gettimeoffset = atari_gettimeoffset;
246 mach_reset = atari_reset; 243 mach_reset = atari_reset;
247#ifdef CONFIG_ATARI_FLOPPY
248 mach_floppy_setup = atari_floppy_setup;
249#endif
250 mach_max_dma_address = 0xffffff; 244 mach_max_dma_address = 0xffffff;
251#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 245#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
252 mach_beep = atari_mksound; 246 mach_beep = atari_mksound;
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 583526fa59c7..750d5b3c971f 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -84,9 +84,6 @@ void (*mach_reset)( void );
84void (*mach_halt)( void ); 84void (*mach_halt)( void );
85void (*mach_power_off)( void ); 85void (*mach_power_off)( void );
86long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 86long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
87#if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
88void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
89#endif
90#ifdef CONFIG_HEARTBEAT 87#ifdef CONFIG_HEARTBEAT
91void (*mach_heartbeat) (int); 88void (*mach_heartbeat) (int);
92EXPORT_SYMBOL(mach_heartbeat); 89EXPORT_SYMBOL(mach_heartbeat);
@@ -527,16 +524,6 @@ int get_hardware_list(char *buffer)
527 return(len); 524 return(len);
528} 525}
529 526
530
531#if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
532void __init floppy_setup(char *str, int *ints)
533{
534 if (mach_floppy_setup)
535 mach_floppy_setup (str, ints);
536}
537
538#endif
539
540void check_bugs(void) 527void check_bugs(void)
541{ 528{
542#ifndef CONFIG_M68KFPU_EMU 529#ifndef CONFIG_M68KFPU_EMU
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index 67e88a4efac0..5e0f9b04d45e 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -36,8 +36,6 @@
36#include <asm/machdep.h> 36#include <asm/machdep.h>
37#include <asm/q40_master.h> 37#include <asm/q40_master.h>
38 38
39extern void floppy_setup(char *str, int *ints);
40
41extern irqreturn_t q40_process_int (int level, struct pt_regs *regs); 39extern irqreturn_t q40_process_int (int level, struct pt_regs *regs);
42extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */ 40extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */
43extern void q40_init_IRQ (void); 41extern void q40_init_IRQ (void);
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c
index 55794d1d4ec3..60e2da1c92c0 100644
--- a/arch/ppc/amiga/config.c
+++ b/arch/ppc/amiga/config.c
@@ -90,9 +90,6 @@ static void a3000_gettod (int *, int *, int *, int *, int *, int *);
90static void a2000_gettod (int *, int *, int *, int *, int *, int *); 90static void a2000_gettod (int *, int *, int *, int *, int *, int *);
91static int amiga_hwclk (int, struct hwclk_time *); 91static int amiga_hwclk (int, struct hwclk_time *);
92static int amiga_set_clock_mmss (unsigned long); 92static int amiga_set_clock_mmss (unsigned long);
93#ifdef CONFIG_AMIGA_FLOPPY
94extern void amiga_floppy_setup(char *, int *);
95#endif
96static void amiga_reset (void); 93static void amiga_reset (void);
97extern void amiga_init_sound(void); 94extern void amiga_init_sound(void);
98static void amiga_savekmsg_init(void); 95static void amiga_savekmsg_init(void);
@@ -419,9 +416,6 @@ void __init config_amiga(void)
419 416
420 mach_hwclk = amiga_hwclk; 417 mach_hwclk = amiga_hwclk;
421 mach_set_clock_mmss = amiga_set_clock_mmss; 418 mach_set_clock_mmss = amiga_set_clock_mmss;
422#ifdef CONFIG_AMIGA_FLOPPY
423 mach_floppy_setup = amiga_floppy_setup;
424#endif
425 mach_reset = amiga_reset; 419 mach_reset = amiga_reset;
426#ifdef CONFIG_HEARTBEAT 420#ifdef CONFIG_HEARTBEAT
427 mach_heartbeat = amiga_heartbeat; 421 mach_heartbeat = amiga_heartbeat;
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c
index f62179f14cbb..c42c50073da5 100644
--- a/arch/ppc/platforms/apus_setup.c
+++ b/arch/ppc/platforms/apus_setup.c
@@ -55,9 +55,6 @@ int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
55int (*mach_set_clock_mmss) (unsigned long) = NULL; 55int (*mach_set_clock_mmss) (unsigned long) = NULL;
56void (*mach_reset)( void ); 56void (*mach_reset)( void );
57long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 57long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
58#if defined(CONFIG_AMIGA_FLOPPY)
59void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
60#endif
61#ifdef CONFIG_HEARTBEAT 58#ifdef CONFIG_HEARTBEAT
62void (*mach_heartbeat) (int) = NULL; 59void (*mach_heartbeat) (int) = NULL;
63extern void apus_heartbeat (void); 60extern void apus_heartbeat (void);
@@ -76,7 +73,6 @@ struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
76 73
77struct mem_info ramdisk; 74struct mem_info ramdisk;
78 75
79extern void amiga_floppy_setup(char *, int *);
80extern void config_amiga(void); 76extern void config_amiga(void);
81 77
82static int __60nsram = 0; 78static int __60nsram = 0;
@@ -305,16 +301,6 @@ void kbd_reset_setup(char *str, int *ints)
305{ 301{
306} 302}
307 303
308/*********************************************************** FLOPPY */
309#if defined(CONFIG_AMIGA_FLOPPY)
310__init
311void floppy_setup(char *str, int *ints)
312{
313 if (mach_floppy_setup)
314 mach_floppy_setup (str, ints);
315}
316#endif
317
318/*********************************************************** MEMORY */ 304/*********************************************************** MEMORY */
319#define KMAP_MAX 32 305#define KMAP_MAX 32
320unsigned long kmap_chunks[KMAP_MAX*3]; 306unsigned long kmap_chunks[KMAP_MAX*3];
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 3e2530d61762..b6e290956214 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1654,12 +1654,6 @@ static struct block_device_operations floppy_fops = {
1654 .media_changed = amiga_floppy_change, 1654 .media_changed = amiga_floppy_change,
1655}; 1655};
1656 1656
1657void __init amiga_floppy_setup (char *str, int *ints)
1658{
1659 printk (KERN_INFO "amiflop: Setting default df0 to %x\n", ints[1]);
1660 fd_def_df0 = ints[1];
1661}
1662
1663static int __init fd_probe_drives(void) 1657static int __init fd_probe_drives(void)
1664{ 1658{
1665 int drive,drives,nomem; 1659 int drive,drives,nomem;
@@ -1845,4 +1839,18 @@ void cleanup_module(void)
1845 unregister_blkdev(FLOPPY_MAJOR, "fd"); 1839 unregister_blkdev(FLOPPY_MAJOR, "fd");
1846} 1840}
1847#endif 1841#endif
1842
1843#else
1844static int __init amiga_floppy_setup (char *str)
1845{
1846 int n;
1847 if (!MACH_IS_AMIGA)
1848 return 0;
1849 if (!get_option(&str, &n))
1850 return 0;
1851 printk (KERN_INFO "amiflop: Setting default df0 to %x\n", n);
1852 fd_def_df0 = n;
1853}
1854
1855__setup("floppy=", amiga_floppy_setup);
1848#endif 1856#endif
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index 69c58ee7b2b6..f8ce235ccfc3 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1951,14 +1951,20 @@ Enomem:
1951 return -ENOMEM; 1951 return -ENOMEM;
1952} 1952}
1953 1953
1954 1954#ifndef MODULE
1955void __init atari_floppy_setup( char *str, int *ints ) 1955static int __init atari_floppy_setup(char *str)
1956{ 1956{
1957 int ints[3 + FD_MAX_UNITS];
1957 int i; 1958 int i;
1959
1960 if (!MACH_IS_ATARI)
1961 return 0;
1962
1963 str = get_options(str, 3 + FD_MAX_UNITS, ints);
1958 1964
1959 if (ints[0] < 1) { 1965 if (ints[0] < 1) {
1960 printk(KERN_ERR "ataflop_setup: no arguments!\n" ); 1966 printk(KERN_ERR "ataflop_setup: no arguments!\n" );
1961 return; 1967 return 0;
1962 } 1968 }
1963 else if (ints[0] > 2+FD_MAX_UNITS) { 1969 else if (ints[0] > 2+FD_MAX_UNITS) {
1964 printk(KERN_ERR "ataflop_setup: too many arguments\n" ); 1970 printk(KERN_ERR "ataflop_setup: too many arguments\n" );
@@ -1978,9 +1984,13 @@ void __init atari_floppy_setup( char *str, int *ints )
1978 else 1984 else
1979 UserSteprate[i-3] = ints[i]; 1985 UserSteprate[i-3] = ints[i];
1980 } 1986 }
1987 return 1;
1981} 1988}
1982 1989
1983static void atari_floppy_exit(void) 1990__setup("floppy=", atari_floppy_setup);
1991#endif
1992
1993static void __exit atari_floppy_exit(void)
1984{ 1994{
1985 int i; 1995 int i;
1986 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); 1996 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h
index a0dd5c47002c..7d3fee342369 100644
--- a/include/asm-m68k/machdep.h
+++ b/include/asm-m68k/machdep.h
@@ -34,7 +34,6 @@ extern void (*mach_power_off)( void );
34extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 34extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
35extern void (*mach_hd_setup)(char *, int *); 35extern void (*mach_hd_setup)(char *, int *);
36extern long mach_max_dma_address; 36extern long mach_max_dma_address;
37extern void (*mach_floppy_setup)(char *, int *);
38extern void (*mach_heartbeat) (int); 37extern void (*mach_heartbeat) (int);
39extern void (*mach_l2_flush) (int); 38extern void (*mach_l2_flush) (int);
40extern void (*mach_beep) (unsigned int, unsigned int); 39extern void (*mach_beep) (unsigned int, unsigned int);
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h
index 5a9f9c297f79..27c90afd3339 100644
--- a/include/asm-m68knommu/machdep.h
+++ b/include/asm-m68knommu/machdep.h
@@ -38,7 +38,6 @@ extern void (*mach_power_off)( void );
38extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 38extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
39extern void (*mach_hd_setup)(char *, int *); 39extern void (*mach_hd_setup)(char *, int *);
40extern long mach_max_dma_address; 40extern long mach_max_dma_address;
41extern void (*mach_floppy_setup)(char *, int *);
42extern void (*mach_floppy_eject)(void); 41extern void (*mach_floppy_eject)(void);
43extern void (*mach_heartbeat) (int); 42extern void (*mach_heartbeat) (int);
44extern void (*mach_l2_flush) (int); 43extern void (*mach_l2_flush) (int);