9
0
Fork 0

ata: Add dev ref to blockdevice during probe

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@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Franck Jullien 2011-11-09 12:29:20 +01:00 committed by Sascha Hauer
parent a8a50ffba1
commit 21d6ca2092
1 changed files with 1 additions and 0 deletions

View File

@ -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);