lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Bug? Report] kref problem
From
Date
On Thu, 2006-03-16 at 09:20 -0800, Greg KH wrote:
> Again, why are you trying to call the sysfs raw functions? You are not
> registering the kobject with the kobject core, so bad things are
> happening. Why not call kobject_register() or kobject_add(), like it is
> documented to do so?

Well, we were discussing this with you some time ago, and you pointed me
to these raw functions. My stuff just does not fit device/driver/bu
modes and you said I have to create whatever sysfs hierarchy I want with
the raw functions.

kobject_register()/kobject_del() instead of
sysfs_create_dir()/sysfs_remove_dir() solved my problem, thanks. Just to
refine this, I'm still going to use
sysfs_create_file()/sysfs_remove_file() to create whatever attributes I
want, is this right?

I've just noticed similarity in naming: sysfs_remove_file() creates a
file, so the symmetrical sysfs_create_dir() creates a directory. So just
started using it. From the names it was not obvious that I could
not. :-)

Thanks.

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

\
 
 \ /
  Last update: 2006-03-16 19:02    [W:0.047 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site