Skip to content

Commit

Permalink
fix(driver): ppm_devnode definition
Browse files Browse the repository at this point in the history
Trust the kmod configure system for `ppm_devnode`, and drop
PPM_RHEL_RELEASE_CODE checks.
Fixes fedora-5.17 build, failing because of RHEL release version 9.99

Signed-off-by: Angelo Puglisi <[email protected]>
  • Loading branch information
deepskyblue86 authored and poiana committed Mar 5, 2024
1 parent c29b69a commit 151b277
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions driver/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2718,20 +2718,15 @@ static int get_tracepoint_handles(void)
#endif

#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)) || \
defined(HAS_DEVNODE_ARG1_CONST) || \
( \
(PPM_RHEL_RELEASE_CODE > 0) && \
(PPM_RHEL_RELEASE_CODE >= PPM_RHEL_RELEASE_VERSION(9, 3)) \
)
#ifdef HAS_DEVNODE_ARG1_CONST
static char *ppm_devnode(const struct device *dev, umode_t *mode)
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)
static char *ppm_devnode(struct device *dev, umode_t *mode)
#else
static char *ppm_devnode(struct device *dev, mode_t *mode)
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0) */
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0) */
#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) */
{
if (mode) {
*mode = 0400;
Expand Down

0 comments on commit 151b277

Please sign in to comment.