Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/device.h
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| #include <sys/bus.h> | #include <sys/bus.h> | ||||
| #include <sys/backlight.h> | #include <sys/backlight.h> | ||||
| struct device; | struct device; | ||||
| struct class { | struct class { | ||||
| const char *name; | const char *name; | ||||
| struct module *owner; | |||||
manu: That will break the kbi no ? | |||||
Done Inline ActionsYes, it will. It is KBI-breaking followup to commit 460908ea55e6. Not intended to be MFC-ed wulf: Yes, it will. It is KBI-breaking followup to commit 460908ea55e6. Not intended to be MFC-ed | |||||
| struct kobject kobj; | struct kobject kobj; | ||||
| devclass_t bsdclass; | devclass_t bsdclass; | ||||
| const struct dev_pm_ops *pm; | const struct dev_pm_ops *pm; | ||||
| const struct attribute_group **dev_groups; | const struct attribute_group **dev_groups; | ||||
| void (*class_release)(struct class *class); | void (*class_release)(struct class *class); | ||||
| void (*dev_release)(struct device *dev); | void (*dev_release)(struct device *dev); | ||||
| char * (*devnode)(struct device *dev, umode_t *mode); | char * (*devnode)(struct device *dev, umode_t *mode); | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | |||||
| static inline void | static inline void | ||||
| put_device(struct device *dev) | put_device(struct device *dev) | ||||
| { | { | ||||
| if (dev) | if (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 | ||||
| class_register(struct class *class) | class_register(struct class *class) | ||||
| { | { | ||||
| class->bsdclass = devclass_create(class->name); | class->bsdclass = devclass_create(class->name); | ||||
| kobject_init(&class->kobj, &linux_class_ktype); | kobject_init(&class->kobj, &linux_class_ktype); | ||||
| ▲ Show 20 Lines • Show All 353 Lines • Show Last 20 Lines | |||||
That will break the kbi no ?