diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-06-01 03:16:17 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-06-01 03:16:17 +0000 |
commit | d8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch) | |
tree | 3067bc130b80d52808e6390c9fc7fc087ec1e33c /drivers/cdrom | |
parent | 19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff) |
Initial revision
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/aztcd.c | 5 | ||||
-rw-r--r-- | drivers/cdrom/bpcd.c | 21 | ||||
-rw-r--r-- | drivers/cdrom/cdi.c | 5 | ||||
-rw-r--r-- | drivers/cdrom/cdu31a.c | 17 | ||||
-rw-r--r-- | drivers/cdrom/cm206.c | 11 | ||||
-rw-r--r-- | drivers/cdrom/gscd.c | 11 | ||||
-rw-r--r-- | drivers/cdrom/isp16.c | 25 | ||||
-rw-r--r-- | drivers/cdrom/mcd.c | 5 | ||||
-rw-r--r-- | drivers/cdrom/mcdx.c | 9 | ||||
-rw-r--r-- | drivers/cdrom/optcd.c | 7 | ||||
-rw-r--r-- | drivers/cdrom/sbpcd.c | 20 | ||||
-rw-r--r-- | drivers/cdrom/sjcd.c | 5 | ||||
-rw-r--r-- | drivers/cdrom/sonycd535.c | 9 |
13 files changed, 84 insertions, 66 deletions
diff --git a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c index 514a7826d..c97133141 100644 --- a/drivers/cdrom/aztcd.c +++ b/drivers/cdrom/aztcd.c @@ -166,6 +166,7 @@ #include <linux/ioport.h> #include <linux/string.h> #include <linux/major.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -1049,7 +1050,7 @@ static int aztGetToc(int multi) Kernel Interface Functions ########################################################################## */ -void aztcd_setup(char *str, int *ints) +__initfunc(void aztcd_setup(char *str, int *ints)) { if (ints[0] > 0) azt_port = ints[1]; if (ints[0] > 1) @@ -1567,7 +1568,7 @@ static int aztcd_release(struct inode * inode, struct file * file) * Test for presence of drive and initialize it. Called at boot time. */ -int aztcd_init(void) +__initfunc(int aztcd_init(void)) { long int count, max_count; unsigned char result[50]; int st; diff --git a/drivers/cdrom/bpcd.c b/drivers/cdrom/bpcd.c index 49225ec0c..9f7e8b395 100644 --- a/drivers/cdrom/bpcd.c +++ b/drivers/cdrom/bpcd.c @@ -113,6 +113,7 @@ #include <linux/delay.h> #include <linux/cdrom.h> #include <linux/ioport.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -201,7 +202,7 @@ static struct file_operations bp_fops = { nybble value. The following function initialises the table. */ -static void init_nyb_map( void ) +__initfunc(static void init_nyb_map( void )) { int i, j; @@ -212,7 +213,7 @@ static void init_nyb_map( void ) } } -int bpcd_init (void) /* preliminary initialisation */ +__initfunc(int bpcd_init (void)) /* preliminary initialisation */ { init_nyb_map(); @@ -327,7 +328,7 @@ void cleanup_module(void) syntax: bpcd=base[,nybble[,rep]] */ -void bpcd_setup(char *str, int *ints) +__initfunc(void bpcd_setup(char *str, int *ints)) { if (ints[0] > 0) bp_base = ints[1]; if (ints[0] > 1) bp_nybble = ints[2]; @@ -425,7 +426,7 @@ static void read_data( char * buf, int len ) if (bp_mode == 2) { t2(1); t2(0x20); } } -static int probe( int id ) +__initfunc(static int probe( int id )) { int l, h, t; int r = -1; @@ -588,7 +589,7 @@ static void bp_eject( void) bp_atapi(ej_cmd,0,"eject"); } -static int bp_reset( void ) +__initfunc(static int bp_reset( void )) /* the ATAPI standard actually specifies the contents of all 7 registers after a reset, but the specification is ambiguous concerning the last @@ -615,7 +616,7 @@ static int bp_reset( void ) return flg-1; } -static int bp_identify( char * id ) +__initfunc(static int bp_identify( char * id )) { int k; char id_cmd[12] = {0x12,0,0,0,36,0,0,0,0,0,0,0}; @@ -627,7 +628,7 @@ static int bp_identify( char * id ) return 0; } -static int bp_port_check( void ) /* check for 8-bit port */ +__initfunc(static int bp_port_check( void )) /* check for 8-bit port */ { int r; @@ -640,7 +641,7 @@ static int bp_port_check( void ) /* check for 8-bit port */ return 0; } -static int bp_locate( void ) +__initfunc(static int bp_locate( void )) { int k; @@ -652,7 +653,7 @@ static int bp_locate( void ) return -1; } -static int bp_do_detect( int autop ) +__initfunc(static int bp_do_detect( int autop )) { char id[18]; @@ -705,7 +706,7 @@ static int bp_do_detect( int autop ) add it here .... */ -static int bp_detect( void ) +__initfunc(static int bp_detect( void )) { if (bp_base) return bp_do_detect(0); if (!bp_do_detect(0x378)) return 0; diff --git a/drivers/cdrom/cdi.c b/drivers/cdrom/cdi.c index c45056d2e..ee90de9c6 100644 --- a/drivers/cdrom/cdi.c +++ b/drivers/cdrom/cdi.c @@ -28,6 +28,7 @@ #include <linux/config.h> #include <linux/blk.h> /* where the proto type of cdi_init() is */ +#include <linux/init.h> #ifdef CONFIG_ISP16_CDI #include <linux/isp16.h> #endif CONFIG_ISP16_CDI @@ -35,8 +36,8 @@ /* * Cdrom interface configuration. */ -int -cdi_init(void) +__initfunc(int +cdi_init(void)) { int ret_val = -1; diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 54c129686..e2c269bcf 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -190,6 +190,7 @@ #include <linux/ioport.h> #include <linux/string.h> #include <linux/malloc.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -220,7 +221,7 @@ static struct unsigned short base; /* I/O Base Address */ short int_num; /* Interrupt Number (-1 means scan for it, 0 means don't use) */ -} cdu31a_addresses[] = +} cdu31a_addresses[] __initdata = { #if 0 /* No autoconfig any more. See Note at beginning of this file. */ @@ -2963,12 +2964,12 @@ static struct file_operations scd_fops = { /* The different types of disc loading mechanisms supported */ -static const char *load_mech[] = { "caddy", "tray", "pop-up", "unknown" }; +static const char *load_mech[] __initdata = { "caddy", "tray", "pop-up", "unknown" }; -static void +__initfunc(static void get_drive_configuration(unsigned short base_io, unsigned char res_reg[], - unsigned int *res_size) + unsigned int *res_size)) { int retry_count; @@ -3032,9 +3033,9 @@ get_drive_configuration(unsigned short base_io, /* * Set up base I/O and interrupts, called from main.c. */ -void +__initfunc(void cdu31a_setup(char *strings, - int *ints) + int *ints)) { if (ints[0] > 0) { @@ -3063,8 +3064,8 @@ static int cdu31a_block_size; /* * Initialize the driver. */ -int -cdu31a_init(void) +__initfunc(int +cdu31a_init(void)) { struct s_sony_drive_config drive_config; unsigned int res_size; diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c index 9411b3f02..fb5533706 100644 --- a/drivers/cdrom/cm206.c +++ b/drivers/cdrom/cm206.c @@ -138,6 +138,7 @@ History: #include <linux/ioport.h> #include <linux/mm.h> #include <linux/malloc.h> +#include <linux/init.h> #include <linux/ucdrom.h> @@ -1186,7 +1187,7 @@ void cleanup(int level) check_region, 15 bits of one port and 6 of another make things likely enough to accept the region on the first hit... */ -int probe_base_port(int base) +__initfunc(int probe_base_port(int base)) { int b=0x300, e=0x370; /* this is the range of start addresses */ volatile int fool, i; @@ -1206,7 +1207,7 @@ int probe_base_port(int base) #if !defined(MODULE) || defined(AUTO_PROBE_MODULE) /* Probe for irq# nr. If nr==0, probe for all possible irq's. */ -int probe_irq(int nr) { +__initfunc(int probe_irq(int nr)) { int irqs, irq; outw(dc_normal | READ_AHEAD, r_data_control); /* disable irq-generation */ sti(); @@ -1220,7 +1221,7 @@ int probe_irq(int nr) { } #endif -int cm206_init(void) +__initfunc(int cm206_init(void)) { uch e=0; long int size=sizeof(struct cm206_struct); @@ -1303,7 +1304,7 @@ int cm206_init(void) static int cm206[2] = {0,0}; /* for compatible `insmod' parameter passing */ -void parse_options(void) +__initfunc(void parse_options(void)) { int i; for (i=0; i<2; i++) { @@ -1337,7 +1338,7 @@ void cleanup_module(void) /* This setup function accepts either `auto' or numbers in the range * 3--11 (for irq) or 0x300--0x370 (for base port) or both. */ -void cm206_setup(char *s, int *p) +__initfunc(void cm206_setup(char *s, int *p)) { int i; if (!strcmp(s, "auto")) auto_probe=1; diff --git a/drivers/cdrom/gscd.c b/drivers/cdrom/gscd.c index c9ad14748..685990a77 100644 --- a/drivers/cdrom/gscd.c +++ b/drivers/cdrom/gscd.c @@ -55,6 +55,7 @@ #include <linux/ioport.h> #include <linux/major.h> #include <linux/string.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -191,7 +192,7 @@ static int check_gscd_med_chg (kdev_t full_dev) } -void gscd_setup (char *str, int *ints) +__initfunc(void gscd_setup (char *str, int *ints)) { if (ints[0] > 0) { @@ -848,7 +849,7 @@ int i; return; } -int find_drives (void) +__initfunc(int find_drives (void)) { int *pdrv; int drvnum; @@ -899,7 +900,7 @@ int i; return drvnum; } -void init_cd_drive ( int num ) +__initfunc(void init_cd_drive ( int num )) { char resp [50]; int i; @@ -991,7 +992,7 @@ void cleanup_module (void) /* Test for presence of drive and initialize it. Called only at boot time. */ -int gscd_init (void) +__initfunc(int gscd_init (void)) { return my_gscd_init (); } @@ -999,7 +1000,7 @@ int gscd_init (void) /* This is the common initialisation for the GoldStar drive. */ /* It is called at boot time AND for module init. */ -int my_gscd_init (void) +__initfunc(int my_gscd_init (void)) { int i; int result; diff --git a/drivers/cdrom/isp16.c b/drivers/cdrom/isp16.c index c3bb43d24..88c070eba 100644 --- a/drivers/cdrom/isp16.c +++ b/drivers/cdrom/isp16.c @@ -48,6 +48,7 @@ #include <linux/string.h> #include <linux/ioport.h> #include <linux/isp16.h> +#include <linux/init.h> #include <asm/io.h> static short isp16_detect(void); @@ -76,8 +77,8 @@ void cleanup_module(void); #define ISP16_OUT(p,b) (outb(isp16_ctrl,ISP16_CTRL_PORT), outb(b,p)) -void -isp16_setup(char *str, int *ints) +__initfunc(void +isp16_setup(char *str, int *ints)) { if ( ints[0] > 0 ) isp16_cdrom_base = ints[1]; @@ -93,8 +94,8 @@ isp16_setup(char *str, int *ints) * ISP16 initialisation. * */ -int -isp16_init(void) +__initfunc(int +isp16_init(void)) { u_char expected_drive; @@ -143,8 +144,8 @@ isp16_init(void) return(0); } -static short -isp16_detect(void) +__initfunc(static short +isp16_detect(void)) { if ( isp16_c929__detect() >= 0 ) @@ -153,8 +154,8 @@ isp16_detect(void) return(isp16_c928__detect()); } -static short -isp16_c928__detect(void) +__initfunc(static short +isp16_c928__detect(void)) { u_char ctrl; u_char enable_cdrom; @@ -202,8 +203,8 @@ isp16_c928__detect(void) return(i); } -static short -isp16_c929__detect(void) +__initfunc(static short +isp16_c929__detect(void)) { u_char ctrl; u_char tmp; @@ -229,8 +230,8 @@ isp16_c929__detect(void) return(2); } -static short -isp16_cdi_config(int base, u_char drive_type, int irq, int dma) +__initfunc(static short +isp16_cdi_config(int base, u_char drive_type, int irq, int dma)) { u_char base_code; u_char irq_code; diff --git a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c index aa6f07ec8..e4d1a73f6 100644 --- a/drivers/cdrom/mcd.c +++ b/drivers/cdrom/mcd.c @@ -80,6 +80,7 @@ #include <linux/ioport.h> #include <linux/string.h> #include <linux/delay.h> +#include <linux/init.h> /* #define REALLY_SLOW_IO */ #include <asm/system.h> @@ -196,7 +197,7 @@ static int GetToc(void); static int getValue(unsigned char *result); -void mcd_setup(char *str, int *ints) +__initfunc(void mcd_setup(char *str, int *ints)) { if (ints[0] > 0) mcd_port = ints[1]; @@ -1175,7 +1176,7 @@ static struct file_operations mcd_fops = { * Test for presence of drive and initialize it. Called at boot time. */ -int mcd_init(void) +__initfunc(int mcd_init(void)) { int count; unsigned char result[3]; diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 081bd0d53..242508f9d 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c @@ -63,6 +63,7 @@ static const char *mcdx_c_version #include <linux/ioport.h> #include <linux/mm.h> #include <linux/malloc.h> +#include <linux/init.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -358,6 +359,10 @@ mcdx_ioctl( msf.cdmsf_sec1 = uint2bcd(msf.cdmsf_sec1); msf.cdmsf_frame1 = uint2bcd(msf.cdmsf_frame1); + stuffp->stop.dt.minute = msf.cdmsf_min1; + stuffp->stop.dt.second = msf.cdmsf_sec1; + stuffp->stop.dt.frame = msf.cdmsf_frame1; + return mcdx_playmsf(stuffp, &msf); } @@ -910,7 +915,7 @@ int check_mcdx_media_change(kdev_t full_dev) return 1; } -void mcdx_setup(char *str, int *pi) +__initfunc(void mcdx_setup(char *str, int *pi)) { if (pi[0] > 0) mcdx_drive_map[0][0] = pi[1]; if (pi[0] > 1) mcdx_drive_map[0][1] = pi[2]; @@ -1160,7 +1165,7 @@ void cleanup_module(void) /* Support functions ************************************************/ -int mcdx_init(void) +__initfunc(int mcdx_init(void)) { int drive; diff --git a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c index 8bd4b84f6..417769111 100644 --- a/drivers/cdrom/optcd.c +++ b/drivers/cdrom/optcd.c @@ -65,6 +65,7 @@ #include <linux/module.h> #include <linux/mm.h> #include <linux/ioport.h> +#include <linux/init.h> #include <asm/io.h> #define MAJOR_NR OPTICS_CDROM_MAJOR @@ -1961,7 +1962,7 @@ static int opt_media_change(kdev_t dev) /* Returns 1 if a drive is detected with a version string starting with "DOLPHIN". Otherwise 0. */ -static int version_ok(void) +__initfunc(static int version_ok(void)) { char devname[100]; int count, i, ch, status; @@ -2016,7 +2017,7 @@ static struct file_operations opt_fops = { /* Get kernel parameter when used as a kernel driver */ -void optcd_setup(char *str, int *ints) +__initfunc(void optcd_setup(char *str, int *ints)) { if (ints[0] > 0) optcd_port = ints[1]; @@ -2024,7 +2025,7 @@ void optcd_setup(char *str, int *ints) /* Test for presence of drive and initialize it. Called at boot time or during module initialisation. */ -int optcd_init(void) +__initfunc(int optcd_init(void)) { int status; diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index 6d27b2248..401dbc657 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c @@ -328,6 +328,7 @@ #include <linux/major.h> #include <linux/string.h> #include <linux/vmalloc.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -3052,7 +3053,7 @@ static int cc_SubChanInfo(int frame, int count, u_char *buffer) } #endif FUTURE /*==========================================================================*/ -static void check_datarate(void) +__initfunc(static void check_datarate(void)) { int i=0; @@ -3122,7 +3123,7 @@ static int c2_ReadError(int fam) } #endif /*==========================================================================*/ -static void ask_mail(void) +__initfunc(static void ask_mail(void)) { int i; @@ -3141,7 +3142,7 @@ static void ask_mail(void) msg(DBG_INF,"infobuf =%s\n", msgbuf); } /*==========================================================================*/ -static int check_version(void) +__initfunc(static int check_version(void)) { int i, j, l; int teac_possible=0; @@ -3439,7 +3440,7 @@ static void switch_drive(int i) /* * probe for the presence of an interface card */ -static int check_card(int port) +__initfunc(static int check_card(int port)) { #undef N_RESPO #define N_RESPO 20 @@ -3543,7 +3544,7 @@ static int check_card(int port) /* * probe for the presence of drives on the selected controller */ -static int check_drives(void) +__initfunc(static int check_drives(void)) { int i, j; @@ -5285,9 +5286,10 @@ static struct file_operations sbpcd_fops = * */ #if (SBPCD_ISSUE-1) -static +__initfunc(static void sbpcd_setup(const char *s, int *p)) +#else +__initfunc(void sbpcd_setup(const char *s, int *p)) #endif -void sbpcd_setup(const char *s, int *p) { setup_done++; msg(DBG_INI,"sbpcd_setup called with %04X,%s\n",p[1], s); @@ -5338,7 +5340,7 @@ void sbpcd_setup(const char *s, int *p) * port 0x330, we have to use an offset of 8; so, the real CDROM port * address is 0x338. */ -static int config_spea(void) +__initfunc(static int config_spea(void)) { /* * base address offset between configuration port and CDROM port, @@ -5397,7 +5399,7 @@ static int config_spea(void) #ifdef MODULE int init_module(void) #else -int SBPCD_INIT(void) +__initfunc(int SBPCD_INIT(void)) #endif MODULE { int i=0, j=0; diff --git a/drivers/cdrom/sjcd.c b/drivers/cdrom/sjcd.c index 0ca13dc3d..67d04134d 100644 --- a/drivers/cdrom/sjcd.c +++ b/drivers/cdrom/sjcd.c @@ -65,6 +65,7 @@ #include <linux/ioport.h> #include <linux/string.h> #include <linux/major.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -159,7 +160,7 @@ static int sjcd_cleanup(void); * Set up device, i.e., use command line data to set * base address. */ -void sjcd_setup( char *str, int *ints ) +__initfunc(void sjcd_setup( char *str, int *ints )) { if (ints[0] > 0) sjcd_base = ints[1]; @@ -1449,7 +1450,7 @@ static struct { * Test for presence of drive and initialize it. Called at boot time. * Probe cdrom, find out version and status. */ -int sjcd_init( void ){ +__initfunc(int sjcd_init( void )){ int i; printk(KERN_INFO "SJCD: Sanyo CDR-H94A cdrom driver version %d.%d.\n", SJCD_VERSION_MAJOR, diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 33b4bd42a..b5c257f9b 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c @@ -120,6 +120,7 @@ #include <linux/genhd.h> #include <linux/mm.h> #include <linux/malloc.h> +#include <linux/init.h> #define REALLY_SLOW_IO #include <asm/system.h> @@ -1484,8 +1485,8 @@ static struct file_operations cdu_fops = /* * Initialize the driver. */ -int -sony535_init(void) +__initfunc(int +sony535_init(void)) { struct s535_sony_drive_config drive_config; Byte cmd_buff[3]; @@ -1649,8 +1650,8 @@ sony535_init(void) * * the address value has to be the existing CDROM port address. */ -void -sonycd535_setup(char *strings, int *ints) +__initfunc(void +sonycd535_setup(char *strings, int *ints)) { /* if IRQ change and default io base desired, * then call with io base of 0 |