aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linuxkpi/common/include/linux/device.h7
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c3
-rw-r--r--sys/ofed/drivers/infiniband/core/ib_cm.c1
3 files changed, 5 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
index 912be8fbae8b..f56a39e904c8 100644
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -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
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index ec4e59f66e7f..9962154cffd9 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -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);
diff --git a/sys/ofed/drivers/infiniband/core/ib_cm.c b/sys/ofed/drivers/infiniband/core/ib_cm.c
index 7ace287b1c88..046f10e085c7 100644
--- a/sys/ofed/drivers/infiniband/core/ib_cm.c
+++ b/sys/ofed/drivers/infiniband/core/ib_cm.c
@@ -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,
};