[PATCH 1/2] ata: Add dev ref to blockdevice during probe

franck.jullien at gmail.com franck.jullien at gmail.com
Wed Nov 9 06:29:20 EST 2011


From: Franck Jullien <franck.jullien at gmail.com>

Add missing reference to dev when register the blockdevice.
This prevent the creation of a cdev with a NULL reference to dev in
blockdevice_register.

Signed-off-by: Franck Jullien <franck.jullien at gmail.com>
---
 drivers/ata/disk_drive.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 6a5dc87..a9d0dee 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -205,6 +205,7 @@ static int disk_probe(struct device_d *dev)
 	atablk->blk.num_blocks = dev->resource[0].size / SECTOR_SIZE;
 	atablk->blk.ops = &ataops;
 	atablk->blk.blockbits = 9;
+	atablk->blk.dev = dev;
 	atablk->dev = dev;
 	atablk->intf = intf;
 	blockdevice_register(&atablk->blk);
-- 
1.7.7




More information about the barebox mailing list