Skip to content

Commit

Permalink
intel_th: Set root device's drvdata early
Browse files Browse the repository at this point in the history
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: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Shishkin authored and Greg Kroah-Hartman committed Feb 20, 2016
1 parent 9700750 commit d7b1787
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/hwtracing/intel_th/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwtracing/intel_th/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d7b1787

Please sign in to comment.