aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/intel_th
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2016-03-04 12:55:10 -0500
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>2016-04-08 09:11:57 -0400
commite8644e4c2aa5c52c357f63af9cc17ef5dce38396 (patch)
tree97cb91dcd46630affb7f37b9bbc47e083e67cd8d /drivers/hwtracing/intel_th
parent9d482aedd0e2389b483ea8ea727ec201b65e2f27 (diff)
intel_th: pti: Create sysfs attributes using core driver's facility
The core intel_th driver allows subdevices to bring in their sysfs attributes. Use this instead of taking care of them in probe and remove. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Laurent Fert <laurent.fert@intel.com>
Diffstat (limited to 'drivers/hwtracing/intel_th')
-rw-r--r--drivers/hwtracing/intel_th/pti.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/hwtracing/intel_th/pti.c b/drivers/hwtracing/intel_th/pti.c
index 2692cad4c3c5..35738b5bfccd 100644
--- a/drivers/hwtracing/intel_th/pti.c
+++ b/drivers/hwtracing/intel_th/pti.c
@@ -200,7 +200,6 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
200 struct resource *res; 200 struct resource *res;
201 struct pti_device *pti; 201 struct pti_device *pti;
202 void __iomem *base; 202 void __iomem *base;
203 int ret;
204 203
205 res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 0); 204 res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 0);
206 if (!res) 205 if (!res)
@@ -219,10 +218,6 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
219 218
220 read_hw_config(pti); 219 read_hw_config(pti);
221 220
222 ret = sysfs_create_group(&dev->kobj, &pti_output_group);
223 if (ret)
224 return ret;
225
226 dev_set_drvdata(dev, pti); 221 dev_set_drvdata(dev, pti);
227 222
228 return 0; 223 return 0;
@@ -230,7 +225,6 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
230 225
231static void intel_th_pti_remove(struct intel_th_device *thdev) 226static void intel_th_pti_remove(struct intel_th_device *thdev)
232{ 227{
233 sysfs_remove_group(&thdev->dev.kobj, &pti_output_group);
234} 228}
235 229
236static struct intel_th_driver intel_th_pti_driver = { 230static struct intel_th_driver intel_th_pti_driver = {
@@ -238,6 +232,7 @@ static struct intel_th_driver intel_th_pti_driver = {
238 .remove = intel_th_pti_remove, 232 .remove = intel_th_pti_remove,
239 .activate = intel_th_pti_activate, 233 .activate = intel_th_pti_activate,
240 .deactivate = intel_th_pti_deactivate, 234 .deactivate = intel_th_pti_deactivate,
235 .attr_group = &pti_output_group,
241 .driver = { 236 .driver = {
242 .name = "pti", 237 .name = "pti",
243 .owner = THIS_MODULE, 238 .owner = THIS_MODULE,