mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +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 {
|
struct class {
|
||||||
const char *name;
|
const char *name;
|
||||||
struct module *owner;
|
|
||||||
struct kobject kobj;
|
struct kobject kobj;
|
||||||
devclass_t bsdclass;
|
devclass_t bsdclass;
|
||||||
const struct dev_pm_ops *pm;
|
const struct dev_pm_ops *pm;
|
||||||
@ -342,9 +341,11 @@ put_device(struct device *dev)
|
|||||||
kobject_put(&dev->kobj);
|
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
|
#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
|
#endif
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
@ -342,13 +342,12 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct class *
|
struct class *
|
||||||
class_create(struct module *owner, const char *name)
|
lkpi_class_create(const char *name)
|
||||||
{
|
{
|
||||||
struct class *class;
|
struct class *class;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
class = kzalloc(sizeof(*class), M_WAITOK);
|
class = kzalloc(sizeof(*class), M_WAITOK);
|
||||||
class->owner = owner;
|
|
||||||
class->name = name;
|
class->name = name;
|
||||||
class->class_release = linux_class_kfree;
|
class->class_release = linux_class_kfree;
|
||||||
error = class_register(class);
|
error = class_register(class);
|
||||||
|
@ -4008,7 +4008,6 @@ static char *cm_devnode(struct device *dev, umode_t *mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct class cm_class = {
|
struct class cm_class = {
|
||||||
.owner = THIS_MODULE,
|
|
||||||
.name = "infiniband_cm",
|
.name = "infiniband_cm",
|
||||||
.devnode = cm_devnode,
|
.devnode = cm_devnode,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user