Initializing a kobject
Posted Oct 2, 2003 17:56 UTC (Thu) by gregkh
Parent article: The zen of kobjects
One minor addition, all fields in a struct kobject must be initialized to zero before calling kobject_init(). If this is not true, bad things can happen when kobject_init() is called.
This is easily done by calling
memset(foo, 0x00, sizeof(*foo)); if foo contained a struct kobject, before calling kobject_init().
to post comments)