Re: [patch] kernel sysfs events layer

From: Andrew Morton
Date: Tue Aug 31 2004 - 19:28:07 EST


Robert Love <rml@xxxxxxxxxx> wrote:
>
> +int send_kevent(enum kevent type, struct kset *kset,
> + struct kobject *kobj, const char *signal)
> +{
> + const char *path;
> + int ret;
> +
> + path = kobject_get_path(kset, kobj, GFP_KERNEL);
> + if (!path)
> + return -ENOMEM;
> +
> + ret = do_send_kevent(type, GFP_KERNEL, path, signal);
> + kfree(path);
> +
> + return ret;
> +}
> +
> +EXPORT_SYMBOL_GPL(send_kevent);
> +
> +int send_kevent_atomic(enum kevent type, struct kset *kset,
> + struct kobject *kobj, const char *signal)
> +{
> + const char *path;
> + int ret;
> +
> + path = kobject_get_path(kset, kobj, GFP_ATOMIC);
> + if (!path)
> + return -ENOMEM;
> +
> + ret = do_send_kevent(type, GFP_ATOMIC, path, signal);
> + kfree(path);
> +
> + return ret;
> +}

Why not share the implementation here?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/