[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>

authored by Al Viro and committed by Linus Torvalds 63907435 0c79358b

+28 -59
-6
arch/m68k/amiga/config.c
··· 105 static int amiga_set_clock_mmss (unsigned long); 106 static unsigned int amiga_get_ss (void); 107 extern void amiga_mksound( unsigned int count, unsigned int ticks ); 108 - #ifdef CONFIG_AMIGA_FLOPPY 109 - extern void amiga_floppy_setup(char *, int *); 110 - #endif 111 static void amiga_reset (void); 112 extern void amiga_init_sound(void); 113 static void amiga_savekmsg_init(void); ··· 424 425 mach_set_clock_mmss = amiga_set_clock_mmss; 426 mach_get_ss = amiga_get_ss; 427 - #ifdef CONFIG_AMIGA_FLOPPY 428 - mach_floppy_setup = amiga_floppy_setup; 429 - #endif 430 mach_reset = amiga_reset; 431 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 432 mach_beep = amiga_mksound;
··· 105 static int amiga_set_clock_mmss (unsigned long); 106 static unsigned int amiga_get_ss (void); 107 extern void amiga_mksound( unsigned int count, unsigned int ticks ); 108 static void amiga_reset (void); 109 extern void amiga_init_sound(void); 110 static void amiga_savekmsg_init(void); ··· 427 428 mach_set_clock_mmss = amiga_set_clock_mmss; 429 mach_get_ss = amiga_get_ss; 430 mach_reset = amiga_reset; 431 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 432 mach_beep = amiga_mksound;
-6
arch/m68k/atari/config.c
··· 52 53 /* local function prototypes */ 54 static void atari_reset( void ); 55 - #ifdef CONFIG_ATARI_FLOPPY 56 - extern void atari_floppy_setup(char *, int *); 57 - #endif 58 static void atari_get_model(char *model); 59 static int atari_get_hardware_list(char *buffer); 60 ··· 241 mach_get_irq_list = show_atari_interrupts; 242 mach_gettimeoffset = atari_gettimeoffset; 243 mach_reset = atari_reset; 244 - #ifdef CONFIG_ATARI_FLOPPY 245 - mach_floppy_setup = atari_floppy_setup; 246 - #endif 247 mach_max_dma_address = 0xffffff; 248 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 249 mach_beep = atari_mksound;
··· 52 53 /* local function prototypes */ 54 static void atari_reset( void ); 55 static void atari_get_model(char *model); 56 static int atari_get_hardware_list(char *buffer); 57 ··· 244 mach_get_irq_list = show_atari_interrupts; 245 mach_gettimeoffset = atari_gettimeoffset; 246 mach_reset = atari_reset; 247 mach_max_dma_address = 0xffffff; 248 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 249 mach_beep = atari_mksound;
-13
arch/m68k/kernel/setup.c
··· 84 void (*mach_halt)( void ); 85 void (*mach_power_off)( void ); 86 long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 87 - #if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY) 88 - void (*mach_floppy_setup) (char *, int *) __initdata = NULL; 89 - #endif 90 #ifdef CONFIG_HEARTBEAT 91 void (*mach_heartbeat) (int); 92 EXPORT_SYMBOL(mach_heartbeat); ··· 523 524 return(len); 525 } 526 - 527 - 528 - #if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY) 529 - void __init floppy_setup(char *str, int *ints) 530 - { 531 - if (mach_floppy_setup) 532 - mach_floppy_setup (str, ints); 533 - } 534 - 535 - #endif 536 537 void check_bugs(void) 538 {
··· 84 void (*mach_halt)( void ); 85 void (*mach_power_off)( void ); 86 long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 87 #ifdef CONFIG_HEARTBEAT 88 void (*mach_heartbeat) (int); 89 EXPORT_SYMBOL(mach_heartbeat); ··· 526 527 return(len); 528 } 529 530 void check_bugs(void) 531 {
-2
arch/m68k/q40/config.c
··· 36 #include <asm/machdep.h> 37 #include <asm/q40_master.h> 38 39 - extern void floppy_setup(char *str, int *ints); 40 - 41 extern irqreturn_t q40_process_int (int level, struct pt_regs *regs); 42 extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */ 43 extern void q40_init_IRQ (void);
··· 36 #include <asm/machdep.h> 37 #include <asm/q40_master.h> 38 39 extern irqreturn_t q40_process_int (int level, struct pt_regs *regs); 40 extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */ 41 extern void q40_init_IRQ (void);
-6
arch/ppc/amiga/config.c
··· 90 static void a2000_gettod (int *, int *, int *, int *, int *, int *); 91 static int amiga_hwclk (int, struct hwclk_time *); 92 static int amiga_set_clock_mmss (unsigned long); 93 - #ifdef CONFIG_AMIGA_FLOPPY 94 - extern void amiga_floppy_setup(char *, int *); 95 - #endif 96 static void amiga_reset (void); 97 extern void amiga_init_sound(void); 98 static void amiga_savekmsg_init(void); ··· 416 417 mach_hwclk = amiga_hwclk; 418 mach_set_clock_mmss = amiga_set_clock_mmss; 419 - #ifdef CONFIG_AMIGA_FLOPPY 420 - mach_floppy_setup = amiga_floppy_setup; 421 - #endif 422 mach_reset = amiga_reset; 423 #ifdef CONFIG_HEARTBEAT 424 mach_heartbeat = amiga_heartbeat;
··· 90 static void a2000_gettod (int *, int *, int *, int *, int *, int *); 91 static int amiga_hwclk (int, struct hwclk_time *); 92 static int amiga_set_clock_mmss (unsigned long); 93 static void amiga_reset (void); 94 extern void amiga_init_sound(void); 95 static void amiga_savekmsg_init(void); ··· 419 420 mach_hwclk = amiga_hwclk; 421 mach_set_clock_mmss = amiga_set_clock_mmss; 422 mach_reset = amiga_reset; 423 #ifdef CONFIG_HEARTBEAT 424 mach_heartbeat = amiga_heartbeat;
-14
arch/ppc/platforms/apus_setup.c
··· 55 int (*mach_set_clock_mmss) (unsigned long) = NULL; 56 void (*mach_reset)( void ); 57 long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 58 - #if defined(CONFIG_AMIGA_FLOPPY) 59 - void (*mach_floppy_setup) (char *, int *) __initdata = NULL; 60 - #endif 61 #ifdef CONFIG_HEARTBEAT 62 void (*mach_heartbeat) (int) = NULL; 63 extern void apus_heartbeat (void); ··· 73 74 struct mem_info ramdisk; 75 76 - extern void amiga_floppy_setup(char *, int *); 77 extern void config_amiga(void); 78 79 static int __60nsram = 0; ··· 300 void kbd_reset_setup(char *str, int *ints) 301 { 302 } 303 - 304 - /*********************************************************** FLOPPY */ 305 - #if defined(CONFIG_AMIGA_FLOPPY) 306 - __init 307 - void floppy_setup(char *str, int *ints) 308 - { 309 - if (mach_floppy_setup) 310 - mach_floppy_setup (str, ints); 311 - } 312 - #endif 313 314 /*********************************************************** MEMORY */ 315 #define KMAP_MAX 32
··· 55 int (*mach_set_clock_mmss) (unsigned long) = NULL; 56 void (*mach_reset)( void ); 57 long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ 58 #ifdef CONFIG_HEARTBEAT 59 void (*mach_heartbeat) (int) = NULL; 60 extern void apus_heartbeat (void); ··· 76 77 struct mem_info ramdisk; 78 79 extern void config_amiga(void); 80 81 static int __60nsram = 0; ··· 304 void kbd_reset_setup(char *str, int *ints) 305 { 306 } 307 308 /*********************************************************** MEMORY */ 309 #define KMAP_MAX 32
+14 -6
drivers/block/amiflop.c
··· 1654 .media_changed = amiga_floppy_change, 1655 }; 1656 1657 - void __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 - 1663 static int __init fd_probe_drives(void) 1664 { 1665 int drive,drives,nomem; ··· 1839 unregister_blkdev(FLOPPY_MAJOR, "fd"); 1840 } 1841 #endif 1842 #endif
··· 1654 .media_changed = amiga_floppy_change, 1655 }; 1656 1657 static int __init fd_probe_drives(void) 1658 { 1659 int drive,drives,nomem; ··· 1845 unregister_blkdev(FLOPPY_MAJOR, "fd"); 1846 } 1847 #endif 1848 + 1849 + #else 1850 + static int __init amiga_floppy_setup (char *str) 1851 + { 1852 + int n; 1853 + if (!MACH_IS_AMIGA) 1854 + return 0; 1855 + if (!get_option(&str, &n)) 1856 + return 0; 1857 + printk (KERN_INFO "amiflop: Setting default df0 to %x\n", n); 1858 + fd_def_df0 = n; 1859 + } 1860 + 1861 + __setup("floppy=", amiga_floppy_setup); 1862 #endif
+14 -4
drivers/block/ataflop.c
··· 1951 return -ENOMEM; 1952 } 1953 1954 - 1955 - void __init atari_floppy_setup( char *str, int *ints ) 1956 { 1957 int i; 1958 1959 if (ints[0] < 1) { 1960 printk(KERN_ERR "ataflop_setup: no arguments!\n" ); 1961 - return; 1962 } 1963 else if (ints[0] > 2+FD_MAX_UNITS) { 1964 printk(KERN_ERR "ataflop_setup: too many arguments\n" ); ··· 1984 else 1985 UserSteprate[i-3] = ints[i]; 1986 } 1987 } 1988 1989 - static void atari_floppy_exit(void) 1990 { 1991 int i; 1992 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
··· 1951 return -ENOMEM; 1952 } 1953 1954 + #ifndef MODULE 1955 + static int __init atari_floppy_setup(char *str) 1956 { 1957 + int ints[3 + FD_MAX_UNITS]; 1958 int i; 1959 + 1960 + if (!MACH_IS_ATARI) 1961 + return 0; 1962 + 1963 + str = get_options(str, 3 + FD_MAX_UNITS, ints); 1964 1965 if (ints[0] < 1) { 1966 printk(KERN_ERR "ataflop_setup: no arguments!\n" ); 1967 + return 0; 1968 } 1969 else if (ints[0] > 2+FD_MAX_UNITS) { 1970 printk(KERN_ERR "ataflop_setup: too many arguments\n" ); ··· 1978 else 1979 UserSteprate[i-3] = ints[i]; 1980 } 1981 + return 1; 1982 } 1983 1984 + __setup("floppy=", atari_floppy_setup); 1985 + #endif 1986 + 1987 + static void __exit atari_floppy_exit(void) 1988 { 1989 int i; 1990 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
-1
include/asm-m68k/machdep.h
··· 34 extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 35 extern void (*mach_hd_setup)(char *, int *); 36 extern long mach_max_dma_address; 37 - extern void (*mach_floppy_setup)(char *, int *); 38 extern void (*mach_heartbeat) (int); 39 extern void (*mach_l2_flush) (int); 40 extern void (*mach_beep) (unsigned int, unsigned int);
··· 34 extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 35 extern void (*mach_hd_setup)(char *, int *); 36 extern long mach_max_dma_address; 37 extern void (*mach_heartbeat) (int); 38 extern void (*mach_l2_flush) (int); 39 extern void (*mach_beep) (unsigned int, unsigned int);
-1
include/asm-m68knommu/machdep.h
··· 38 extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 39 extern void (*mach_hd_setup)(char *, int *); 40 extern long mach_max_dma_address; 41 - extern void (*mach_floppy_setup)(char *, int *); 42 extern void (*mach_floppy_eject)(void); 43 extern void (*mach_heartbeat) (int); 44 extern void (*mach_l2_flush) (int);
··· 38 extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); 39 extern void (*mach_hd_setup)(char *, int *); 40 extern long mach_max_dma_address; 41 extern void (*mach_floppy_eject)(void); 42 extern void (*mach_heartbeat) (int); 43 extern void (*mach_l2_flush) (int);