Commit cc4f265a authored by Stewart Smith's avatar Stewart Smith Committed by Benjamin Herrenschmidt

powerpc/powernv Adapt opal-elog and opal-dump to new sysfs_remove_file_self

We are currently using sysfs_schedule_callback() which is deprecated
and about to be removed. Switch to the new interface instead.
Signed-off-by: default avatarStewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 4952ef9a
...@@ -86,19 +86,14 @@ static int64_t dump_send_ack(uint32_t dump_id) ...@@ -86,19 +86,14 @@ static int64_t dump_send_ack(uint32_t dump_id)
return rc; return rc;
} }
static void delay_release_kobj(void *kobj)
{
kobject_put((struct kobject *)kobj);
}
static ssize_t dump_ack_store(struct dump_obj *dump_obj, static ssize_t dump_ack_store(struct dump_obj *dump_obj,
struct dump_attribute *attr, struct dump_attribute *attr,
const char *buf, const char *buf,
size_t count) size_t count)
{ {
dump_send_ack(dump_obj->id); dump_send_ack(dump_obj->id);
sysfs_schedule_callback(&dump_obj->kobj, delay_release_kobj, sysfs_remove_file_self(&dump_obj->kobj, &attr->attr);
&dump_obj->kobj, THIS_MODULE); kobject_put(&dump_obj->kobj);
return count; return count;
} }
......
...@@ -70,19 +70,14 @@ static ssize_t elog_ack_show(struct elog_obj *elog_obj, ...@@ -70,19 +70,14 @@ static ssize_t elog_ack_show(struct elog_obj *elog_obj,
return sprintf(buf, "ack - acknowledge log message\n"); return sprintf(buf, "ack - acknowledge log message\n");
} }
static void delay_release_kobj(void *kobj)
{
kobject_put((struct kobject *)kobj);
}
static ssize_t elog_ack_store(struct elog_obj *elog_obj, static ssize_t elog_ack_store(struct elog_obj *elog_obj,
struct elog_attribute *attr, struct elog_attribute *attr,
const char *buf, const char *buf,
size_t count) size_t count)
{ {
opal_send_ack_elog(elog_obj->id); opal_send_ack_elog(elog_obj->id);
sysfs_schedule_callback(&elog_obj->kobj, delay_release_kobj, sysfs_remove_file_self(&elog_obj->kobj, &attr->attr);
&elog_obj->kobj, THIS_MODULE); kobject_put(&elog_obj->kobj);
return count; return count;
} }
......
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