summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/intel_th
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2016-02-15 20:11:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-21 01:09:14 +0300
commitd7b1787161b78a5125cbb91d0f7512612bb642ad (patch)
tree6fdd47dae2265efe43c3530d7937cab6a151abed /drivers/hwtracing/intel_th
parent97007500ec3f9b08913ebec986068b9d250a6eed (diff)
downloadlinux-d7b1787161b78a5125cbb91d0f7512612bb642ad.tar.xz
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: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/intel_th')
-rw-r--r--drivers/hwtracing/intel_th/core.c2
-rw-r--r--drivers/hwtracing/intel_th/pci.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index b8b9895da5d1..6df3cd9774bc 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -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;
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
index 09017073d7a4..bca7a2ac00d6 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -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;
}