提交 d7b17871 编写于 作者: A Alexander Shishkin 提交者: Greg Kroah-Hartman

intel_th: Set root device's drvdata early

Already during the subdevice initialization time, devices will need
to reference Intel TH controller descriptor structure.

This patch moves setting the drvdata from the pci glue to intel_th
core, before subdevices are populated.
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 97007500
......@@ -584,6 +584,8 @@ intel_th_alloc(struct device *dev, struct resource *devres,
}
th->dev = dev;
dev_set_drvdata(dev, th);
err = intel_th_populate(th, devres, ndevres, irq);
if (err)
goto err_chrdev;
......
......@@ -46,8 +46,6 @@ static int intel_th_pci_probe(struct pci_dev *pdev,
if (IS_ERR(th))
return PTR_ERR(th);
pci_set_drvdata(pdev, th);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册