Skip to content

Commit

Permalink
remove module * parameter from class_create()
Browse files Browse the repository at this point in the history
From v6.4, class_create() does not have module *

From linux commit aaba11da9aa7d7d6b52a74d45b31cac118295a1
---------------------------------------------
driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, 
and it shouldn't have been requred to be set as a parameter even 
if it did something.  So just remove it and fix up all callers of the 
function in the kernel tree at the same time.
  • Loading branch information
mechanicalamit authored Sep 1, 2023
1 parent 863a9e2 commit 2bdc30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chardev.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int __init chardev_init(void)

pr_info("I was assigned major number %d.\n", major);

cls = class_create(THIS_MODULE, DEVICE_NAME);
cls = class_create(DEVICE_NAME);
device_create(cls, NULL, MKDEV(major, 0), NULL, DEVICE_NAME);

pr_info("Device created on /dev/%s\n", DEVICE_NAME);
Expand Down

0 comments on commit 2bdc30c

Please sign in to comment.