Commit 9d482aed authored by Alexander Shishkin's avatar Alexander Shishkin

intel_th: msu: 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: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: default avatarLaurent Fert <laurent.fert@intel.com>
parent b5edbf1e
...@@ -1478,10 +1478,6 @@ static int intel_th_msc_probe(struct intel_th_device *thdev) ...@@ -1478,10 +1478,6 @@ static int intel_th_msc_probe(struct intel_th_device *thdev)
if (err) if (err)
return err; return err;
err = sysfs_create_group(&dev->kobj, &msc_output_group);
if (err)
return err;
dev_set_drvdata(dev, msc); dev_set_drvdata(dev, msc);
return 0; return 0;
...@@ -1489,7 +1485,6 @@ static int intel_th_msc_probe(struct intel_th_device *thdev) ...@@ -1489,7 +1485,6 @@ static int intel_th_msc_probe(struct intel_th_device *thdev)
static void intel_th_msc_remove(struct intel_th_device *thdev) static void intel_th_msc_remove(struct intel_th_device *thdev)
{ {
sysfs_remove_group(&thdev->dev.kobj, &msc_output_group);
} }
static struct intel_th_driver intel_th_msc_driver = { static struct intel_th_driver intel_th_msc_driver = {
...@@ -1498,6 +1493,7 @@ static struct intel_th_driver intel_th_msc_driver = { ...@@ -1498,6 +1493,7 @@ static struct intel_th_driver intel_th_msc_driver = {
.activate = intel_th_msc_activate, .activate = intel_th_msc_activate,
.deactivate = intel_th_msc_deactivate, .deactivate = intel_th_msc_deactivate,
.fops = &intel_th_msc_fops, .fops = &intel_th_msc_fops,
.attr_group = &msc_output_group,
.driver = { .driver = {
.name = "msc", .name = "msc",
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment