Commit 1826eadfc42839af7c1c5a1859510aff635d3fa1
Committed by
Jens Axboe
1 parent
ff88972c85
Exists in
master
and in
20 other branches
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>
Showing 2 changed files with 5 additions and 3 deletions Side-by-side Diff
block/genhd.c
... | ... | @@ -24,6 +24,8 @@ |
24 | 24 | struct kobject *block_depr; |
25 | 25 | #endif |
26 | 26 | |
27 | +static struct device_type disk_type; | |
28 | + | |
27 | 29 | /* |
28 | 30 | * Can be deleted altogether. Later. |
29 | 31 | * |
... | ... | @@ -502,7 +504,7 @@ |
502 | 504 | .name = "block", |
503 | 505 | }; |
504 | 506 | |
505 | -struct device_type disk_type = { | |
507 | +static struct device_type disk_type = { | |
506 | 508 | .name = "disk", |
507 | 509 | .groups = disk_attr_groups, |
508 | 510 | .release = disk_release, |
509 | 511 | |
... | ... | @@ -632,12 +634,14 @@ |
632 | 634 | put_device(gd->driverfs_dev); |
633 | 635 | } |
634 | 636 | |
637 | +#if 0 | |
635 | 638 | void genhd_media_change_notify(struct gendisk *disk) |
636 | 639 | { |
637 | 640 | get_device(disk->driverfs_dev); |
638 | 641 | schedule_work(&disk->async_notify); |
639 | 642 | } |
640 | 643 | EXPORT_SYMBOL_GPL(genhd_media_change_notify); |
644 | +#endif /* 0 */ | |
641 | 645 | |
642 | 646 | dev_t blk_lookup_devt(const char *name) |
643 | 647 | { |
include/linux/genhd.h
... | ... | @@ -18,7 +18,6 @@ |
18 | 18 | #define dev_to_disk(device) container_of(device, struct gendisk, dev) |
19 | 19 | #define dev_to_part(device) container_of(device, struct hd_struct, dev) |
20 | 20 | |
21 | -extern struct device_type disk_type; | |
22 | 21 | extern struct device_type part_type; |
23 | 22 | extern struct kobject *block_depr; |
24 | 23 | extern struct class block_class; |
... | ... | @@ -556,7 +555,6 @@ |
556 | 555 | extern struct gendisk *alloc_disk(int minors); |
557 | 556 | extern struct kobject *get_disk(struct gendisk *disk); |
558 | 557 | extern void put_disk(struct gendisk *disk); |
559 | -extern void genhd_media_change_notify(struct gendisk *disk); | |
560 | 558 | extern void blk_register_region(dev_t devt, unsigned long range, |
561 | 559 | struct module *module, |
562 | 560 | struct kobject *(*probe)(dev_t, int *, void *), |