Skip to content

Commit

Permalink
Merge pull request #111 from slaclab/pre-release
Browse files Browse the repository at this point in the history
Release Candidate 5.19.3
  • Loading branch information
ruck314 authored Jan 27, 2024
2 parents 33f2dbb + e9865b3 commit dd033bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion common/driver/dma_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,18 @@ int Dma_Init(struct DmaDevice *dev) {
// Create class struct if it does not already exist
if (gCl == NULL) {
dev_info(dev->device,"Init: Creating device class\n");
if ((gCl = class_create(THIS_MODULE, dev->devName)) == NULL) {

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
gCl = class_create(THIS_MODULE, dev->devName);
#else
gCl = class_create(dev->devName);
#endif

if (gCl == NULL) {
dev_err(dev->device,"Init: Failed to create device class\n");
goto cleanup_cdev_add;
}

gCl->devnode = (void *)Dma_DevNode;
}

Expand Down

0 comments on commit dd033bf

Please sign in to comment.