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:
Vladimir Kondratyev 2024-07-21 16:09:58 +03:00
parent 7774e08adf
commit 1fe7cd0243
3 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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);

View File

@ -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,
};