Fix compilation errors for Linux kernel 6.17#77
Open
Ciel2006 wants to merge 1 commit into
Open
Conversation
Update all four driver modules to be compatible with kernel 6.17 API changes: applespi.c: - Replace removed asm/unaligned.h with linux/unaligned.h - Update spi_transfer delay_usecs to delay.value/delay.unit API - Replace removed no_llseek with noop_llseek - Rewrite EFI variable functions to use efivar_get/set_variable API - Change applespi_remove/appleacpi_remove return type from int to void - Remove .owner from struct acpi_driver - Add MODULE_IMPORT_NS(EFIVAR) apple-ibridge.c: - Update report_fixup return type to const __u8 * - Change appleib_remove return type from int to void - Remove .owner from acpi_driver apple-ib-tb.c: - Change appletb_platform_remove return type from int to void apple-ib-als.c: - Add parent device arg to iio_device_alloc/iio_trigger_alloc - Replace iio_dev->id with iio_device_id() - Change appleals_platform_remove return type from int to void Tested on MacBook8,1 (2015 12" MacBook) running Ubuntu 25.10 with kernel 6.17.0-19-generic.
Copilot AI
added a commit
to LeslieKeys/skills-introduction-to-github
that referenced
this pull request
Mar 21, 2026
Applied all fixes from roadrunner2/macbook12-spi-driver#77: - applespi.c: linux/unaligned.h header, SPI delay struct fields, noop_llseek, efivar API update, void remove callbacks, remove .owner from acpi_driver, MODULE_IMPORT_NS(EFIVAR) - apple-ibridge.c: const report_fixup return type, void remove, remove .owner from acpi_driver - apple-ib-tb.c: void platform_remove callback - apple-ib-als.c: iio_device_alloc/iio_trigger_alloc parent arg, iio_device_id(), void platform_remove callback Co-authored-by: LeslieKeys <66516783+LeslieKeys@users.noreply.github.com> Agent-Logs-Url: https://github.com/LeslieKeys/skills-introduction-to-github/sessions/0b2ef6e7-9a92-4b51-b4a4-16034156f587
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 16 compilation errors across all four driver modules when building against Linux kernel 6.17 (tested on 6.17.0-19-generic).
Changes
applespi.c (8 fixes):
asm/unaligned.h→linux/unaligned.h(header relocated)delay_usecs→delay.value+delay.unit(4 instances)no_llseek→noop_llseekefivar_get_variable/efivar_set_variableapplespi_remove/appleacpi_remove:int→voidreturn.owner = THIS_MODULEfromstruct acpi_driverMODULE_IMPORT_NS("EFIVAR")apple-ibridge.c (3 fixes):
report_fixupreturn type:__u8 *→const __u8 *appleib_remove:int→void.ownerfromacpi_driverapple-ib-tb.c (1 fix):
appletb_platform_remove:int→voidapple-ib-als.c (3 fixes):
iio_device_alloc/iio_trigger_allocnow require parent device as first argiio_dev->id→iio_device_id(iio_dev)appleals_platform_remove:int→voidTesting