return sysfs_remove_groups(&cls->p->subsys.kobj, groups);
}
-int __class_register(struct class *cls, struct module *owner, struct lock_class_key *key)
+int __class_register(struct class *cls, struct lock_class_key *key)
{
struct subsys_private *cp;
int error;
if (error)
goto err_out;
- cls->owner = owner;
error = class_add_groups(class_get(cls), cls->class_groups);
class_put(cls);
if (error) {
/**
* __class_create - create a struct class structure
- * @owner: pointer to the module that is to "own" this struct class
* @name: pointer to a string for the name of this class.
* @key: the lock_class_key for this class; used by mutex lock debugging
*
* Note, the pointer created here is to be destroyed when finished by
* making a call to class_destroy().
*/
-struct class *__class_create(struct module *owner, const char *name,
- struct lock_class_key *key)
+struct class *__class_create(const char *name, struct lock_class_key *key)
{
struct class *cls;
int retval;
cls->name = name;
cls->class_release = class_create_release;
- retval = __class_register(cls, owner, key);
+ retval = __class_register(cls, key);
if (retval)
goto error;
/**
* struct class - device classes
* @name: Name of the class.
- * @owner: The module owner.
* @class_groups: Default attributes of this class.
* @dev_groups: Default attributes of the devices that belong to the class.
* @dev_kobj: The kobject that represents this class and links it into the hierarchy.
*/
struct class {
const char *name;
- struct module *owner;
const struct attribute_group **class_groups;
const struct attribute_group **dev_groups;
extern struct kobject *sysfs_dev_block_kobj;
extern struct kobject *sysfs_dev_char_kobj;
extern int __must_check __class_register(struct class *class,
- struct module *owner,
struct lock_class_key *key);
extern void class_unregister(struct class *class);
/* This is a #define to keep the compiler from merging different
* instances of the __key variable */
-#define class_register(class) \
-({ \
- static struct lock_class_key __key; \
- __class_register(class, THIS_MODULE, &__key); \
+#define class_register(class) \
+({ \
+ static struct lock_class_key __key; \
+ __class_register(class, &__key); \
})
struct class_compat;
extern int __must_check class_interface_register(struct class_interface *);
extern void class_interface_unregister(struct class_interface *);
-extern struct class * __must_check __class_create(struct module *owner,
- const char *name,
+extern struct class * __must_check __class_create(const char *name,
struct lock_class_key *key);
extern void class_destroy(struct class *cls);
/**
* class_create - create a struct class structure
- * @owner: pointer to the module that is to "own" this struct class
+ * @owner: dummy pointer, does nothing, will be removed soon.
* @name: pointer to a string for the name of this class.
*
* This is used to create a struct class pointer that can then be used
#define class_create(owner, name) \
({ \
static struct lock_class_key __key; \
- __class_create(owner, name, &__key); \
+ __class_create(name, &__key); \
})