summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-05 15:54:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-07 12:17:02 +0100
commit527d03763676002ecad6b97bf23471e93e99534b (patch)
treecb35d82fc750358deaf355593ce55e77866edcb7 /drivers/ata
parent030904efdd5bda2f3416a5acc4c8f843a5954113 (diff)
downloadbarebox-527d03763676002ecad6b97bf23471e93e99534b.tar.gz
barebox-527d03763676002ecad6b97bf23471e93e99534b.tar.xz
ata: register disks as /dev/ata*
Using /dev/disk* for every type of device is not helpful. It increases the chance that the user doesn't know which file corresponds to which device. So rename ata device files to /dev/ata*. Also add a dev_info about which device just has been registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/disk_ata_drive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c
index 6bb72a9756..56dcd2ad4e 100644
--- a/drivers/ata/disk_ata_drive.c
+++ b/drivers/ata/disk_ata_drive.c
@@ -572,12 +572,12 @@ int register_ata_drive(struct device_d *dev, struct ata_ioports *io)
#ifdef DEBUG
ata_dump_id(drive->id);
#endif
- rc = cdev_find_free_index("disk");
+ rc = cdev_find_free_index("ata");
if (rc == -1)
pr_err("Cannot find a free index for the disk node\n");
drive->blk.num_blocks = ata_id_n_sectors(drive->id);
- drive->blk.cdev.name = asprintf("disk%d", rc);
+ drive->blk.cdev.name = asprintf("ata%d", rc);
drive->blk.blockbits = SECTOR_SHIFT;
rc = blockdevice_register(&drive->blk);
@@ -586,6 +586,8 @@ int register_ata_drive(struct device_d *dev, struct ata_ioports *io)
goto on_error;
}
+ dev_info(dev, "registered /dev/%s\n", drive->blk.cdev.name);
+
/* create partitions on demand */
rc = parse_partition_table(&drive->blk);
if (rc != 0)