m68k/mac/: possible cleanups
Subsystems (2)
PATCH 1/1 m68k/mac/: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global code (always) static:
- baboon.c: struct baboon
- baboon.c: baboon_irq()
- config.c: mac_orig_videoaddr
- config.c: mac_identify()
- config.c: mac_report_hardware()
- config.c: mac_debug_console_write()
- config.c: mac_sccb_console_write()
- config.c: mac_scca_console_write()
- config.c: mac_init_scc_port()
- oss.c: oss_irq()
- oss.c: oss_nubus_irq()
- psc.c: psc_debug_dump()
- psc.c: psc_dma_die_die_die()
- via.c: rbv_clear
- remove the unused bootparse.c
- #if 0 the following unused functions:
- config.c: mac_debugging_short()
- config.c: mac_debugging_long()
- remove the following unused code:
- config.c: mac_bisize
- config.c: mac_env
- config.c: mac_SCC_init_done
- config.c: mac_SCC_reset_done
- config.c: mac_init_scca_port()
- config.c: mac_init_sccb_port()
---
arch/m68k/mac/Makefile | 2 arch/m68k/mac/baboon.c | 26 +++---- arch/m68k/mac/bootparse.c | 122 ---------------------------------- arch/m68k/mac/config.c | 11 +-- arch/m68k/mac/debug.c | 41 ++--------- arch/m68k/mac/oss.c | 8 +- arch/m68k/mac/psc.c | 4 - arch/m68k/mac/via.c | 2 include/asm-m68k/mac_baboon.h | 2 include/asm-m68k/mac_via.h | 1 include/asm-m68k/macintosh.h | 5 - 11 files changed, 35 insertions(+), 189 deletions(-)
85484a9afa74515effef5d64809496a962d3dadc diff --git a/arch/m68k/mac/Makefile b/arch/m68k/mac/Makefile index 1d265ba..daebd80 100644
arch/m68k/mac/Makefile +1 -1
@@ -2,5 +2,5 @@ # Makefile for Linux arch/m68k/mac source directory # -obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \ +obj-y := config.o macints.o iop.o via.o oss.o psc.o \ baboon.o macboing.o debug.o misc.o
arch/m68k/mac/baboon.c +12 -14
@@ -23,9 +23,7 @@/* #define DEBUG_IRQS */ int baboon_present; -volatile struct baboon *baboon; - -irqreturn_t baboon_irq (int ,void *); +static volatile struct baboon *baboon;#if 0 extern int macide_ack_intr (struct ata_channel *);
@@ -50,20 +48,10 @@ void __init baboon_init(void) }/* -* Register the Baboon interrupt dispatcher on nubus slot $C. -*/ - -void __init baboon_register_interrupts (void ) -{ -request_irq (IRQ_NUBUS_C , baboon_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , -"baboon" , (void *) baboon); -} - -/* * Baboon interrupt handler. This works a lot like a VIA. */ -irqreturn_t baboon_irq (int irq,void *dev_id) +static irqreturn_t baboon_irq (int irq,void *dev_id) {int irq_bit, irq_num;unsigned char events;
@@ -95,6 +83,16 @@ irqreturn_t baboon_irq(int irq, void *dev_id)return IRQ_HANDLED ; } +/* +* Register the Baboon interrupt dispatcher on nubus slot $C. +*/ + +void __init baboon_register_interrupts (void ) +{ +request_irq (IRQ_NUBUS_C , baboon_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , +"baboon" , (void *) baboon); +} +void baboon_irq_enable (int irq) {#ifdef DEBUG_IRQUSE printk ("baboon_irq_enable(%d)\n" , irq);
arch/m68k/mac/bootparse.c deleted +0 -122
122 lines not on this page · raw message
arch/m68k/mac/config.c +5 -6
@@ -46,7 +46,6 @@/* Mac bootinfo struct */ struct mac_booter_data mac_bi_data; -int mac_bisize =sizeof mac_bi_data;/* New m68k bootinfo stuff and videobase */
@@ -55,10 +54,8 @@ extern struct mem_info m68k_memory[NUM_MEMINFO];extern struct mem_info m68k_ramdisk; -void *mac_env;/* Loaded by the boot asm */ -/* The phys. video addr. - might be bogus on some machines */ -unsigned long mac_orig_videoaddr; +static unsigned long mac_orig_videoaddr;/* Mac specific timer functions */ extern unsigned long mac_gettimeoffset (void );
@@ -79,6 +76,8 @@ extern void mac_mksound(unsigned int, unsigned int);extern void nubus_sweep_video (void );static void mac_get_model (char *str); +static void mac_identify (void ); +static void mac_report_hardware (void );static void __init mac_sched_init (irq_handler_t vector) {
@@ -765,7 +764,7 @@ static struct mac_model mac_data_table[] = { } }; -void __init mac_identify (void ) +static void __init mac_identify (void ) {struct mac_model *m;
@@ -821,7 +820,7 @@ void __init mac_identify(void)baboon_init (); } -void __init mac_report_hardware (void ) +static void __init mac_report_hardware (void ) {printk (KERN_INFO "Apple Macintosh %s\n" , macintosh_config->name); }
arch/m68k/mac/debug.c +10 -31
94 lines not on this page · raw message
arch/m68k/mac/oss.c +4 -4
@@ -30,8 +30,8 @@int oss_present;volatile struct mac_oss *oss; -irqreturn_t oss_irq (int ,void *); -irqreturn_t oss_nubus_irq (int ,void *); +static irqreturn_t oss_irq (int ,void *); +static irqreturn_t oss_nubus_irq (int ,void *);extern irqreturn_t via1_irq (int ,void *);extern irqreturn_t mac_scc_dispatch (int ,void *);
@@ -92,7 +92,7 @@ void __init oss_nubus_init(void)* and SCSI; everything else is routed to its own autovector IRQ. */ -irqreturn_t oss_irq (int irq,void *dev_id) +static irqreturn_t oss_irq (int irq,void *dev_id) {int events;
@@ -126,7 +126,7 @@ irqreturn_t oss_irq(int irq, void *dev_id)* Unlike the VIA/RBV this is on its own autovector interrupt level. */ -irqreturn_t oss_nubus_irq (int irq,void *dev_id) +static irqreturn_t oss_nubus_irq (int irq,void *dev_id) {int events, irq_bit, i;
arch/m68k/mac/psc.c +2 -2
@@ -36,7 +36,7 @@ irqreturn_t psc_irq(int, void *);* Debugging dump, used in various places to see what's going on. */ -void psc_debug_dump (void ) +static void psc_debug_dump (void ) {int i;
@@ -55,7 +55,7 @@ void psc_debug_dump(void)* expanded to cover what I think are the other 7 channels. */ -void psc_dma_die_die_die (void ) +static void psc_dma_die_die_die (void ) {int i;
arch/m68k/mac/via.c +1 -1
@@ -45,7 +45,7 @@ volatile long *via_memory_bogon=(long *)&via_memory_bogon;int rbv_present;int via_alt_mapping;EXPORT_SYMBOL (via_alt_mapping); -__u8 rbv_clear; +static __u8 rbv_clear;/* * Globals for accessing the VIA chip registers without having to
include/asm-m68k/mac_baboon.h +0 -2
@@ -29,6 +29,4 @@ struct baboon { */ }; -extern volatile struct baboon *baboon; -#endif /* __ASSEMBLY **/
include/asm-m68k/mac_via.h +0 -1
@@ -253,7 +253,6 @@extern volatile __u8 *via1,*via2;extern int rbv_present,via_alt_mapping; -extern __u8 rbv_clear;static inline int rbv_set_video_bpp (int bpp) {
include/asm-m68k/macintosh.h +0 -5
@@ -12,8 +12,6 @@ extern void mac_reset(void);extern void mac_poweroff (void );extern void mac_init_IRQ (void );extern int mac_irq_pending (unsigned int ); -extern void mac_identify (void ); -extern void mac_report_hardware (void );/* * Floppy driver magic hook - probably shouldnt be here
@@ -21,9 +19,6 @@ extern void mac_report_hardware(void);extern void via1_set_head (int ); -extern void parse_booter (char *ptr); -extern void print_booter (char *ptr); -/* * Macintosh Table */