#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/dcache.h>
+#include <linux/namei.h>
#include <linux/err.h>
+#include <linux/fs.h>
+#include <asm/semaphore.h>
#include "sysfs.h"
{
struct dentry * dir;
- if (grp->name)
- dir = sysfs_get_dentry(kobj->dentry,grp->name);
+ if (grp->name) {
+ dir = lookup_one_len_kern(grp->name, kobj->dentry,
+ strlen(grp->name));
+ BUG_ON(IS_ERR(dir));
+ }
else
dir = dget(kobj->dentry);