Skip to content

Commit

Permalink
block/genhd.c: cleanups
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
AdrianBunk authored and Jens Axboe committed Mar 4, 2008
1 parent ff88972 commit 1826ead
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ static DEFINE_MUTEX(block_class_lock);
struct kobject *block_depr;
#endif

static struct device_type disk_type;

/*
* Can be deleted altogether. Later.
*
Expand Down Expand Up @@ -502,7 +504,7 @@ struct class block_class = {
.name = "block",
};

struct device_type disk_type = {
static struct device_type disk_type = {
.name = "disk",
.groups = disk_attr_groups,
.release = disk_release,
Expand Down Expand Up @@ -632,12 +634,14 @@ static void media_change_notify_thread(struct work_struct *work)
put_device(gd->driverfs_dev);
}

#if 0
void genhd_media_change_notify(struct gendisk *disk)
{
get_device(disk->driverfs_dev);
schedule_work(&disk->async_notify);
}
EXPORT_SYMBOL_GPL(genhd_media_change_notify);
#endif /* 0 */

dev_t blk_lookup_devt(const char *name)
{
Expand Down
2 changes: 0 additions & 2 deletions include/linux/genhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define dev_to_disk(device) container_of(device, struct gendisk, dev)
#define dev_to_part(device) container_of(device, struct hd_struct, dev)

extern struct device_type disk_type;
extern struct device_type part_type;
extern struct kobject *block_depr;
extern struct class block_class;
Expand Down Expand Up @@ -556,7 +555,6 @@ extern struct gendisk *alloc_disk_node(int minors, int node_id);
extern struct gendisk *alloc_disk(int minors);
extern struct kobject *get_disk(struct gendisk *disk);
extern void put_disk(struct gendisk *disk);
extern void genhd_media_change_notify(struct gendisk *disk);
extern void blk_register_region(dev_t devt, unsigned long range,
struct module *module,
struct kobject *(*probe)(dev_t, int *, void *),
Expand Down

0 comments on commit 1826ead

Please sign in to comment.