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:
parent
a8a50ffba1
commit
21d6ca2092
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue