Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -6
+1 -6
drivers/hwtracing/intel_th/pti.c
··· 200 200 struct resource *res; 201 201 struct pti_device *pti; 202 202 void __iomem *base; 203 - int ret; 204 203 205 204 res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 0); 206 205 if (!res) ··· 218 219 219 220 read_hw_config(pti); 220 221 221 - ret = sysfs_create_group(&dev->kobj, &pti_output_group); 222 - if (ret) 223 - return ret; 224 - 225 222 dev_set_drvdata(dev, pti); 226 223 227 224 return 0; ··· 225 230 226 231 static void intel_th_pti_remove(struct intel_th_device *thdev) 227 232 { 228 - sysfs_remove_group(&thdev->dev.kobj, &pti_output_group); 229 233 } 230 234 231 235 static struct intel_th_driver intel_th_pti_driver = { ··· 232 238 .remove = intel_th_pti_remove, 233 239 .activate = intel_th_pti_activate, 234 240 .deactivate = intel_th_pti_deactivate, 241 + .attr_group = &pti_output_group, 235 242 .driver = { 236 243 .name = "pti", 237 244 .owner = THIS_MODULE,