aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-03-04 05:23:46 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-03-04 05:28:31 -0500
commit1826eadfc42839af7c1c5a1859510aff635d3fa1 (patch)
tree387895990fb3db91cbf9d82d33f5df27d62a0219
parentff88972c850ced92b9c4c7f538d85829c741eeb0 (diff)
block/genhd.c: cleanups
This patch contains the following cleanups: - make the needlessly global struct disk_type static - #if 0 the unused genhd_media_change_notify() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--block/genhd.c6
-rw-r--r--include/linux/genhd.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/block/genhd.c b/block/genhd.c
index abc6feddc8c6..c44527d16c52 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -24,6 +24,8 @@ static DEFINE_MUTEX(block_class_lock);
24struct kobject *block_depr; 24struct kobject *block_depr;
25#endif 25#endif
26 26
27static struct device_type disk_type;
28
27/* 29/*
28 * Can be deleted altogether. Later. 30 * Can be deleted altogether. Later.
29 * 31 *
@@ -502,7 +504,7 @@ struct class block_class = {
502 .name = "block", 504 .name = "block",
503}; 505};
504 506
505struct device_type disk_type = { 507static struct device_type disk_type = {
506 .name = "disk", 508 .name = "disk",
507 .groups = disk_attr_groups, 509 .groups = disk_attr_groups,
508 .release = disk_release, 510 .release = disk_release,
@@ -632,12 +634,14 @@ static void media_change_notify_thread(struct work_struct *work)
632 put_device(gd->driverfs_dev); 634 put_device(gd->driverfs_dev);
633} 635}
634 636
637#if 0
635void genhd_media_change_notify(struct gendisk *disk) 638void genhd_media_change_notify(struct gendisk *disk)
636{ 639{
637 get_device(disk->driverfs_dev); 640 get_device(disk->driverfs_dev);
638 schedule_work(&disk->async_notify); 641 schedule_work(&disk->async_notify);
639} 642}
640EXPORT_SYMBOL_GPL(genhd_media_change_notify); 643EXPORT_SYMBOL_GPL(genhd_media_change_notify);
644#endif /* 0 */
641 645
642dev_t blk_lookup_devt(const char *name) 646dev_t blk_lookup_devt(const char *name)
643{ 647{
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 09a3b18918c7..cd048e3cc96d 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -18,7 +18,6 @@
18#define dev_to_disk(device) container_of(device, struct gendisk, dev) 18#define dev_to_disk(device) container_of(device, struct gendisk, dev)
19#define dev_to_part(device) container_of(device, struct hd_struct, dev) 19#define dev_to_part(device) container_of(device, struct hd_struct, dev)
20 20
21extern struct device_type disk_type;
22extern struct device_type part_type; 21extern struct device_type part_type;
23extern struct kobject *block_depr; 22extern struct kobject *block_depr;
24extern struct class block_class; 23extern struct class block_class;
@@ -556,7 +555,6 @@ extern struct gendisk *alloc_disk_node(int minors, int node_id);
556extern struct gendisk *alloc_disk(int minors); 555extern struct gendisk *alloc_disk(int minors);
557extern struct kobject *get_disk(struct gendisk *disk); 556extern struct kobject *get_disk(struct gendisk *disk);
558extern void put_disk(struct gendisk *disk); 557extern void put_disk(struct gendisk *disk);
559extern void genhd_media_change_notify(struct gendisk *disk);
560extern void blk_register_region(dev_t devt, unsigned long range, 558extern void blk_register_region(dev_t devt, unsigned long range,
561 struct module *module, 559 struct module *module,
562 struct kobject *(*probe)(dev_t, int *, void *), 560 struct kobject *(*probe)(dev_t, int *, void *),