Re: [PATCH 3/5] driver: provide sysfs interfaces to access TXT log
From: Greg Kroah-Hartman
Date: Sat Apr 27 2013 - 09:17:23 EST
On Sat, Apr 27, 2013 at 10:56:18PM +0800, Qiaowei Ren wrote:
> +ssize_t sysfs_create_log(struct kobject *parent)
> +{
> + struct kobject *log_kobj;
> + int retval;
> +
> + log_kobj = kobject_create_and_add("log", parent);
> + if (!log_kobj)
> + return -ENOMEM;
> +
> + retval = sysfs_create_group(log_kobj, &log_attr_grp);
> + if (retval)
> + kobject_put(log_kobj);
> + return retval;
> +}
> +EXPORT_SYMBOL_GPL(sysfs_create_log);
Seriously? That's what you are calling this function?
{sigh}
Please, go get this patch series reviewed by other, experienced, Intel
developers, before you send it out again. There's loads of things wrong
with this series, and they can help you out much easier, and nicer, than
I'm going to be here.
Oh, and NEVER use "raw" kobjects, by doing that, you know you are doing
something wrong in a driver.
greg k-h
--
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/