Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383253 > unrolled thread

[QUEUED v20160420 13/19] intel_th: pti: Create sysfs attributes using core driver's facility

Started byAlexander Shishkin <alexander.shishkin@linux.intel.com>
First post2016-04-20 12:50 +0200
Last post2016-04-20 12:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [QUEUED v20160420 13/19] intel_th: pti: Create sysfs attributes using core driver's facility Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-20 12:50 +0200

#1383253 — [QUEUED v20160420 13/19] intel_th: pti: Create sysfs attributes using core driver's facility

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2016-04-20 12:50 +0200
Subject[QUEUED v20160420 13/19] intel_th: pti: Create sysfs attributes using core driver's facility
Message-ID<rpXRL-6vx-7@gated-at.bofh.it>
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>
---
 drivers/hwtracing/intel_th/pti.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/hwtracing/intel_th/pti.c b/drivers/hwtracing/intel_th/pti.c
index 2692cad4c3..35738b5bfc 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)
 	struct resource *res;
 	struct pti_device *pti;
 	void __iomem *base;
-	int ret;
 
 	res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 0);
 	if (!res)
@@ -219,10 +218,6 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
 
 	read_hw_config(pti);
 
-	ret = sysfs_create_group(&dev->kobj, &pti_output_group);
-	if (ret)
-		return ret;
-
 	dev_set_drvdata(dev, pti);
 
 	return 0;
@@ -230,7 +225,6 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
 
 static void intel_th_pti_remove(struct intel_th_device *thdev)
 {
-	sysfs_remove_group(&thdev->dev.kobj, &pti_output_group);
 }
 
 static struct intel_th_driver intel_th_pti_driver = {
@@ -238,6 +232,7 @@ static struct intel_th_driver intel_th_pti_driver = {
 	.remove	= intel_th_pti_remove,
 	.activate	= intel_th_pti_activate,
 	.deactivate	= intel_th_pti_deactivate,
+	.attr_group	= &pti_output_group,
 	.driver	= {
 		.name	= "pti",
 		.owner	= THIS_MODULE,
-- 
2.8.0.rc3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web