Skip to content

Commit b540026

Browse files
committed
xbus-sysfs.c: astribank_match signature incompatible with RHEL 9.8+ (kernel 5.14)
On RHEL 9.8+ (kernel 5.14), the match callback in struct bus_type changed its second argument from struct device_driver * to const struct device_driver *, causing a -Werror=incompatible-pointer-types build failure resolves: #104
1 parent 648016d commit b540026

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/dahdi/dahdi-sysfs-chan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static void chan_release(struct device *dev)
220220
chan_dbg(DEVICES, chan, "SYSFS\n");
221221
}
222222

223-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
223+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ||(defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 8)))
224224
static int chan_match(struct device *dev, const struct device_driver *driver)
225225
#else
226226
static int chan_match(struct device *dev, struct device_driver *driver)

drivers/dahdi/dahdi-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module_param(tools_rootdir, charp, 0444);
4242
MODULE_PARM_DESC(tools_rootdir,
4343
"root directory of all tools paths (default /)");
4444

45-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
45+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ||(defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 8)))
4646
static int span_match(struct device *dev, const struct device_driver *driver)
4747
#else
4848
static int span_match(struct device *dev, struct device_driver *driver)

drivers/dahdi/xpp/xbus-sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ static struct attribute *xbus_dev_attrs[] = {
397397
ATTRIBUTE_GROUPS(xbus_dev);
398398
#endif
399399

400-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
400+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ||(defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 8)))
401401
static int astribank_match(struct device *dev, const struct device_driver *driver)
402402
#else
403403
static int astribank_match(struct device *dev, struct device_driver *driver)
@@ -778,7 +778,7 @@ static DEVICE_ATTR_READER(refcount_xpd_show, dev, buf)
778778
return len;
779779
}
780780

781-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
781+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ||(defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 8)))
782782
static int xpd_match(struct device *dev, const struct device_driver *driver)
783783
#else
784784
static int xpd_match(struct device *dev, struct device_driver *driver)

0 commit comments

Comments
 (0)