patch-2.1.37 linux/drivers/block/rd.c

Next file: linux/drivers/block/xd.c
Previous file: linux/drivers/block/ps2esdi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -51,9 +51,11 @@
 #include <linux/ioctl.h>
 #include <linux/fd.h>
 #include <linux/module.h>
+#include <linux/init.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/byteorder.h>
 
 extern void wait_for_keypress(void);
 
@@ -269,7 +271,7 @@
 };
 
 /* This is the registration and initialization section of the ramdisk driver */
-int rd_init(void)
+__initfunc(int rd_init(void))
 {
 	int		i;
 
@@ -334,8 +336,8 @@
  *	romfs
  * 	gzip
  */
-int
-identify_ramdisk_image(kdev_t device, struct file *fp, int start_block)
+__initfunc(int
+identify_ramdisk_image(kdev_t device, struct file *fp, int start_block))
 {
 	const int size = 512;
 	struct minix_super_block *minixsb;
@@ -440,7 +442,7 @@
 /*
  * This routine loads in the ramdisk image.
  */
-static void rd_load_image(kdev_t device,int offset)
+__initfunc(static void rd_load_image(kdev_t device,int offset))
 {
 	struct inode inode, out_inode;
 	struct file infile, outfile;
@@ -527,7 +529,7 @@
 }
 
 
-void rd_load()
+__initfunc(void rd_load(void))
 {
 	if (rd_doload == 0)
 		return;
@@ -549,7 +551,7 @@
 
 
 #ifdef CONFIG_BLK_DEV_INITRD
-void initrd_load(void)
+__initfunc(void initrd_load(void))
 {
 	rd_load_image(MKDEV(MAJOR_NR, INITRD_MINOR),0);
 }
@@ -608,21 +610,21 @@
 
 #include "../../lib/inflate.c"
 
-static void *malloc(int size)
+__initfunc(static void *malloc(int size))
 {
 	return kmalloc(size, GFP_KERNEL);
 }
 
-static void free(void *where)
+__initfunc(static void free(void *where))
 {
 	kfree(where);
 }
 
-static void gzip_mark(void **ptr)
+__initfunc(static void gzip_mark(void **ptr))
 {
 }
 
-static void gzip_release(void **ptr)
+__initfunc(static void gzip_release(void **ptr))
 {
 }
 
@@ -631,7 +633,7 @@
  * Fill the input buffer. This is called only when the buffer is empty
  * and at least one byte is really needed.
  */
-static int fill_inbuf()
+__initfunc(static int fill_inbuf(void))
 {
 	if (exit_code) return -1;
 	
@@ -648,7 +650,7 @@
  * Write the output window window[0..outcnt-1] and update crc and bytes_out.
  * (Used for the decompressed data only.)
  */
-static void flush_window()
+__initfunc(static void flush_window(void))
 {
     ulg c = crc;         /* temporary variable */
     unsigned n;
@@ -666,14 +668,14 @@
     outcnt = 0;
 }
 
-static void error(char *x)
+__initfunc(static void error(char *x))
 {
 	printk(KERN_ERR "%s", x);
 	exit_code = 1;
 }
 
-static int
-crd_load(struct file * fp, struct file *outfp)
+__initfunc(static int
+crd_load(struct file * fp, struct file *outfp))
 {
 	int result;
 	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov