Skip to content

Commit d7bbc8a

Browse files
committed
Fix compilation issue for Rocky linux 9.4
1 parent 0693bb9 commit d7bbc8a

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

drivers/dahdi/dahdi-sysfs-chan.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,12 @@ int __init dahdi_sysfs_chan_init(const struct file_operations *fops)
484484
should_cleanup.channel_driver = 1;
485485

486486
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
487+
#if defined RHEL_RELEASE_VERSION && (RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
488+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4)
489+
dahdi_class = class_create("dahdi");
490+
#else
487491
dahdi_class = class_create(THIS_MODULE, "dahdi");
492+
#endif
488493
#else
489494
dahdi_class = class_create("dahdi");
490495
#endif

drivers/dahdi/dahdi-sysfs.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ static inline struct dahdi_span *dev_to_span(const struct device *dev)
6969
} while (0)
7070

7171
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
72+
#if defined RHEL_RELEASE_VERSION && (RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
73+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4)
74+
static int span_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
75+
#else
7276
static int span_uevent(struct device *dev, struct kobj_uevent_env *kenv)
77+
#endif
7378
#else
7479
static int span_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
7580
#endif
@@ -442,9 +447,13 @@ static inline struct dahdi_device *to_ddev(const struct device *dev)
442447
return err; \
443448
} while (0)
444449

445-
446450
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
451+
#if defined RHEL_RELEASE_VERSION && (RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
452+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4)
453+
static int device_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
454+
#else
447455
static int device_uevent(struct device *dev, struct kobj_uevent_env *kenv)
456+
#endif
448457
#else
449458
static int device_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
450459
#endif

drivers/dahdi/xpp/xbus-sysfs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,12 @@ static int astribank_match(struct device *dev, struct device_driver *driver)
420420

421421

422422
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
423+
#if defined RHEL_RELEASE_VERSION && (RHEL_RELEASE_CODE) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) && \
424+
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4)
425+
static int astribank_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
426+
#else
423427
static int astribank_uevent(struct device *dev, struct kobj_uevent_env *kenv)
428+
#endif
424429
#else
425430
static int astribank_uevent(const struct device *dev, struct kobj_uevent_env *kenv)
426431
#endif

0 commit comments

Comments
 (0)