Skip to content

Commit 6390743

Browse files
Al ViroLinus Torvalds
authored andcommitted
[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>
1 parent 0c79358 commit 6390743

10 files changed

Lines changed: 28 additions & 59 deletions

File tree

‎arch/m68k/amiga/config.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ static int a2000_hwclk (int, struct rtc_time *);
105105
static int amiga_set_clock_mmss (unsigned long);
106106
static unsigned int amiga_get_ss (void);
107107
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
111108
static void amiga_reset (void);
112109
extern void amiga_init_sound(void);
113110
static void amiga_savekmsg_init(void);
@@ -427,9 +424,6 @@ void __init config_amiga(void)
427424

428425
mach_set_clock_mmss = amiga_set_clock_mmss;
429426
mach_get_ss = amiga_get_ss;
430-
#ifdef CONFIG_AMIGA_FLOPPY
431-
mach_floppy_setup = amiga_floppy_setup;
432-
#endif
433427
mach_reset = amiga_reset;
434428
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
435429
mach_beep = amiga_mksound;

‎arch/m68k/atari/config.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ int atari_rtc_year_offset;
5252

5353
/* local function prototypes */
5454
static void atari_reset( void );
55-
#ifdef CONFIG_ATARI_FLOPPY
56-
extern void atari_floppy_setup(char *, int *);
57-
#endif
5855
static void atari_get_model(char *model);
5956
static int atari_get_hardware_list(char *buffer);
6057

@@ -244,9 +241,6 @@ void __init config_atari(void)
244241
mach_get_irq_list = show_atari_interrupts;
245242
mach_gettimeoffset = atari_gettimeoffset;
246243
mach_reset = atari_reset;
247-
#ifdef CONFIG_ATARI_FLOPPY
248-
mach_floppy_setup = atari_floppy_setup;
249-
#endif
250244
mach_max_dma_address = 0xffffff;
251245
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
252246
mach_beep = atari_mksound;

‎arch/m68k/kernel/setup.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ void (*mach_reset)( void );
8484
void (*mach_halt)( void );
8585
void (*mach_power_off)( void );
8686
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
9087
#ifdef CONFIG_HEARTBEAT
9188
void (*mach_heartbeat) (int);
9289
EXPORT_SYMBOL(mach_heartbeat);
@@ -527,16 +524,6 @@ int get_hardware_list(char *buffer)
527524
return(len);
528525
}
529526

530-
531-
#if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
532-
void __init floppy_setup(char *str, int *ints)
533-
{
534-
if (mach_floppy_setup)
535-
mach_floppy_setup (str, ints);
536-
}
537-
538-
#endif
539-
540527
void check_bugs(void)
541528
{
542529
#ifndef CONFIG_M68KFPU_EMU

‎arch/m68k/q40/config.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
#include <asm/machdep.h>
3737
#include <asm/q40_master.h>
3838

39-
extern void floppy_setup(char *str, int *ints);
40-
4139
extern irqreturn_t q40_process_int (int level, struct pt_regs *regs);
4240
extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */
4341
extern void q40_init_IRQ (void);

‎arch/ppc/amiga/config.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ static void a3000_gettod (int *, int *, int *, int *, int *, int *);
9090
static void a2000_gettod (int *, int *, int *, int *, int *, int *);
9191
static int amiga_hwclk (int, struct hwclk_time *);
9292
static int amiga_set_clock_mmss (unsigned long);
93-
#ifdef CONFIG_AMIGA_FLOPPY
94-
extern void amiga_floppy_setup(char *, int *);
95-
#endif
9693
static void amiga_reset (void);
9794
extern void amiga_init_sound(void);
9895
static void amiga_savekmsg_init(void);
@@ -419,9 +416,6 @@ void __init config_amiga(void)
419416

420417
mach_hwclk = amiga_hwclk;
421418
mach_set_clock_mmss = amiga_set_clock_mmss;
422-
#ifdef CONFIG_AMIGA_FLOPPY
423-
mach_floppy_setup = amiga_floppy_setup;
424-
#endif
425419
mach_reset = amiga_reset;
426420
#ifdef CONFIG_HEARTBEAT
427421
mach_heartbeat = amiga_heartbeat;

‎arch/ppc/platforms/apus_setup.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
5555
int (*mach_set_clock_mmss) (unsigned long) = NULL;
5656
void (*mach_reset)( void );
5757
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
6158
#ifdef CONFIG_HEARTBEAT
6259
void (*mach_heartbeat) (int) = NULL;
6360
extern void apus_heartbeat (void);
@@ -76,7 +73,6 @@ struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
7673

7774
struct mem_info ramdisk;
7875

79-
extern void amiga_floppy_setup(char *, int *);
8076
extern void config_amiga(void);
8177

8278
static int __60nsram = 0;
@@ -305,16 +301,6 @@ void kbd_reset_setup(char *str, int *ints)
305301
{
306302
}
307303

308-
/*********************************************************** FLOPPY */
309-
#if defined(CONFIG_AMIGA_FLOPPY)
310-
__init
311-
void floppy_setup(char *str, int *ints)
312-
{
313-
if (mach_floppy_setup)
314-
mach_floppy_setup (str, ints);
315-
}
316-
#endif
317-
318304
/*********************************************************** MEMORY */
319305
#define KMAP_MAX 32
320306
unsigned long kmap_chunks[KMAP_MAX*3];

‎drivers/block/amiflop.c‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,12 +1654,6 @@ static struct block_device_operations floppy_fops = {
16541654
.media_changed = amiga_floppy_change,
16551655
};
16561656

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-
16631657
static int __init fd_probe_drives(void)
16641658
{
16651659
int drive,drives,nomem;
@@ -1845,4 +1839,18 @@ void cleanup_module(void)
18451839
unregister_blkdev(FLOPPY_MAJOR, "fd");
18461840
}
18471841
#endif
1842+
1843+
#else
1844+
static 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);
18481856
#endif

‎drivers/block/ataflop.c‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,14 +1951,20 @@ static int __init atari_floppy_init (void)
19511951
return -ENOMEM;
19521952
}
19531953

1954-
1955-
void __init atari_floppy_setup( char *str, int *ints )
1954+
#ifndef MODULE
1955+
static int __init atari_floppy_setup(char *str)
19561956
{
1957+
int ints[3 + FD_MAX_UNITS];
19571958
int i;
1959+
1960+
if (!MACH_IS_ATARI)
1961+
return 0;
1962+
1963+
str = get_options(str, 3 + FD_MAX_UNITS, ints);
19581964

19591965
if (ints[0] < 1) {
19601966
printk(KERN_ERR "ataflop_setup: no arguments!\n" );
1961-
return;
1967+
return 0;
19621968
}
19631969
else if (ints[0] > 2+FD_MAX_UNITS) {
19641970
printk(KERN_ERR "ataflop_setup: too many arguments\n" );
@@ -1978,9 +1984,13 @@ void __init atari_floppy_setup( char *str, int *ints )
19781984
else
19791985
UserSteprate[i-3] = ints[i];
19801986
}
1987+
return 1;
19811988
}
19821989

1983-
static void atari_floppy_exit(void)
1990+
__setup("floppy=", atari_floppy_setup);
1991+
#endif
1992+
1993+
static void __exit atari_floppy_exit(void)
19841994
{
19851995
int i;
19861996
blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);

‎include/asm-m68k/machdep.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ extern void (*mach_power_off)( void );
3434
extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
3535
extern void (*mach_hd_setup)(char *, int *);
3636
extern long mach_max_dma_address;
37-
extern void (*mach_floppy_setup)(char *, int *);
3837
extern void (*mach_heartbeat) (int);
3938
extern void (*mach_l2_flush) (int);
4039
extern void (*mach_beep) (unsigned int, unsigned int);

‎include/asm-m68knommu/machdep.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ extern void (*mach_power_off)( void );
3838
extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
3939
extern void (*mach_hd_setup)(char *, int *);
4040
extern long mach_max_dma_address;
41-
extern void (*mach_floppy_setup)(char *, int *);
4241
extern void (*mach_floppy_eject)(void);
4342
extern void (*mach_heartbeat) (int);
4443
extern void (*mach_l2_flush) (int);

0 commit comments

Comments
 (0)