mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 17:44:17 +01:00
LinuxKPI: Remove owner argument from class_create function on KBI layer
To chase Linux 6.4 Sponsored by: Serenity Cyber Security, LLC Differential Revision: https://reviews.freebsd.org/D45849
This commit is contained in:
parent
7774e08adf
commit
1fe7cd0243
@ -57,7 +57,6 @@ struct device;
|
||||
|
||||
struct class {
|
||||
const char *name;
|
||||
struct module *owner;
|
||||
struct kobject kobj;
|
||||
devclass_t bsdclass;
|
||||
const struct dev_pm_ops *pm;
|
||||
@ -342,9 +341,11 @@ put_device(struct device *dev)
|
||||
kobject_put(&dev->kobj);
|
||||
}
|
||||
|
||||
struct class *class_create(struct module *owner, const char *name);
|
||||
struct class *lkpi_class_create(const char *name);
|
||||
#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60400
|
||||
#define class_create(name) class_create(NULL, name)
|
||||
#define class_create(name) lkpi_class_create(name)
|
||||
#else
|
||||
#define class_create(owner, name) lkpi_class_create(name)
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
|
@ -342,13 +342,12 @@ error:
|
||||
}
|
||||
|
||||
struct class *
|
||||
class_create(struct module *owner, const char *name)
|
||||
lkpi_class_create(const char *name)
|
||||
{
|
||||
struct class *class;
|
||||
int error;
|
||||
|
||||
class = kzalloc(sizeof(*class), M_WAITOK);
|
||||
class->owner = owner;
|
||||
class->name = name;
|
||||
class->class_release = linux_class_kfree;
|
||||
error = class_register(class);
|
||||
|
@ -4008,7 +4008,6 @@ static char *cm_devnode(struct device *dev, umode_t *mode)
|
||||
}
|
||||
|
||||
struct class cm_class = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "infiniband_cm",
|
||||
.devnode = cm_devnode,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user