Skip to content

Fix compilation errors for Linux kernel 6.17#77

Open
Ciel2006 wants to merge 1 commit into
roadrunner2:touchbar-driver-hid-driverfrom
Ciel2006:fix/kernel-6.17-compat
Open

Fix compilation errors for Linux kernel 6.17#77
Ciel2006 wants to merge 1 commit into
roadrunner2:touchbar-driver-hid-driverfrom
Ciel2006:fix/kernel-6.17-compat

Conversation

@Ciel2006
Copy link
Copy Markdown

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.hlinux/unaligned.h (header relocated)
  • delay_usecsdelay.value + delay.unit (4 instances)
  • no_llseeknoop_llseek
  • Rewrote EFI variable helpers to use efivar_get_variable/efivar_set_variable
  • applespi_remove/appleacpi_remove: intvoid return
  • Removed .owner = THIS_MODULE from struct acpi_driver
  • Added MODULE_IMPORT_NS("EFIVAR")

apple-ibridge.c (3 fixes):

  • report_fixup return type: __u8 *const __u8 *
  • appleib_remove: intvoid
  • Removed .owner from acpi_driver

apple-ib-tb.c (1 fix):

  • appletb_platform_remove: intvoid

apple-ib-als.c (3 fixes):

  • iio_device_alloc/iio_trigger_alloc now require parent device as first arg
  • iio_dev->idiio_device_id(iio_dev)
  • appleals_platform_remove: intvoid

Testing

  • Built and installed on MacBook8,1 (2015 12" MacBook)
  • Ubuntu 25.10, kernel 6.17.0-19-generic
  • All 4 modules compile cleanly and load successfully
  • Keyboard and trackpad functional after resolving a separate IRQ routing issue

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant