Commit d18e8b1b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

ide: remove ide_{,un}register_region

There is no need to ever register the fake gendisk used for ide-tape.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a160c615
......@@ -929,38 +929,6 @@ static struct kobject *ata_probe(dev_t dev, int *part, void *data)
return NULL;
}
static struct kobject *exact_match(dev_t dev, int *part, void *data)
{
struct gendisk *p = data;
*part &= (1 << PARTN_BITS) - 1;
return &disk_to_dev(p)->kobj;
}
static int exact_lock(dev_t dev, void *data)
{
struct gendisk *p = data;
if (!get_disk_and_module(p))
return -1;
return 0;
}
void ide_register_region(struct gendisk *disk)
{
blk_register_region(MKDEV(disk->major, disk->first_minor),
disk->minors, NULL, exact_match, exact_lock, disk);
}
EXPORT_SYMBOL_GPL(ide_register_region);
void ide_unregister_region(struct gendisk *disk)
{
blk_unregister_region(MKDEV(disk->major, disk->first_minor),
disk->minors);
}
EXPORT_SYMBOL_GPL(ide_unregister_region);
void ide_init_disk(struct gendisk *disk, ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
......
......@@ -1822,7 +1822,6 @@ static void ide_tape_remove(ide_drive_t *drive)
ide_proc_unregister_driver(drive, tape->driver);
device_del(&tape->dev);
ide_unregister_region(tape->disk);
mutex_lock(&idetape_ref_mutex);
put_device(&tape->dev);
......@@ -2026,7 +2025,6 @@ static int ide_tape_probe(ide_drive_t *drive)
"n%s", tape->name);
g->fops = &idetape_block_ops;
ide_register_region(g);
return 0;
......
......@@ -1493,9 +1493,6 @@ static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; }
static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {}
#endif
void ide_register_region(struct gendisk *);
void ide_unregister_region(struct gendisk *);
void ide_check_nien_quirk_list(ide_drive_t *);
void ide_undecoded_slave(ide_drive_t *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment