Skip to contentSkip to conversation

trival patch to dm.c and dm.h

PATCH New Dave Olien 1 participant 1 message Apr 28, 2004 Device mapper

lore
Share & tools
lore

Dave Olien

author
#0 lore raw

PATCH 1/1 trival patch to dm.c and dm.h

dm_blk_dops is made static, and add __exit to local_exit(). Modified local_init() declaration to look more like other uses of __init.

drivers/md/dm.c +5 -3
diff -ur linux-2.6.6-rc2-udm1-original/drivers/md/dm.c linux-2.6.6-rc2-udm1-patched/drivers/md/dm.c
@@ -93,7 +93,7 @@
 static kmem_cache_t *_io_cache;
 static kmem_cache_t *_tio_cache;
 
-static __init int local_init(void)
+static int __init local_init(void)
 {
 	int r;
 
@@ -125,7 +125,7 @@
 	return 0;
 }
 
-static void local_exit(void)
+static void __exit local_exit(void)
 {
 	kmem_cache_destroy(_tio_cache);
 	kmem_cache_destroy(_io_cache);
@@ -663,6 +663,8 @@
 	return r;
 }
 
+static struct block_device_operations dm_blk_dops;
+
 /*
  * Allocate and initialise a blank device with a given minor.
  */
@@ -1100,7 +1102,7 @@
 	return test_bit(DMF_SUSPENDED, &md->flags);
 }
 
-struct block_device_operations dm_blk_dops = {
+static struct block_device_operations dm_blk_dops = {
 	.open = dm_blk_open,
 	.release = dm_blk_close,
 	.owner = THIS_MODULE
drivers/md/dm.h +0 -2
diff -ur linux-2.6.6-rc2-udm1-original/drivers/md/dm.h linux-2.6.6-rc2-udm1-patched/drivers/md/dm.h
@@ -31,8 +31,6 @@
 
 #define SECTOR_SHIFT 9
 
-extern struct block_device_operations dm_blk_dops;
-
 /*
  * List of devices that a metadevice uses and should open/close.
  */