aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ac97/bus.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sound/ac97/bus.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 7985dd8198b6..045330883a96 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -273,7 +273,7 @@ static struct attribute *ac97_controller_device_attrs[] = {
NULL
};
-static struct attribute_group ac97_adapter_attr_group = {
+static const struct attribute_group ac97_adapter_attr_group = {
.name = "ac97_operations",
.attrs = ac97_controller_device_attrs,
};
@@ -460,7 +460,7 @@ static ssize_t vendor_id_show(struct device *dev,
{
struct ac97_codec_device *codec = to_ac97_device(dev);
- return sprintf(buf, "%08x", codec->vendor_id);
+ return sysfs_emit(buf, "%08x", codec->vendor_id);
}
DEVICE_ATTR_RO(vendor_id);
@@ -514,15 +514,15 @@ static int ac97_bus_probe(struct device *dev)
return ret;
}
-static int ac97_bus_remove(struct device *dev)
+static void ac97_bus_remove(struct device *dev)
{
struct ac97_codec_device *adev = to_ac97_device(dev);
struct ac97_codec_driver *adrv = to_ac97_driver(dev->driver);
int ret;
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0)
- return ret;
+ return;
ret = adrv->remove(adev);
pm_runtime_put_noidle(dev);
@@ -530,8 +530,6 @@ static int ac97_bus_remove(struct device *dev)
ac97_put_disable_clk(adev);
pm_runtime_disable(dev);
-
- return ret;
}
static struct bus_type ac97_bus_type = {