HomeFreeBSD

linuxkpi: Add `BIN_ATTR*()` macros

Description

linuxkpi: Add BIN_ATTR*() macros

They are helpers to declare static struct bin_attribute.

The amdgpu DRM driver started to use them for some time but the code was
commented out (and this is still the case as of this commit). In Linux
6.8, it declared a new BIN_ATTR. This new code is not commented out.

While here, change the first argument of the read and write
callbacks to be a struct linux_file * instead of a struct file *.
This ensures the right structure is being referenced at compile time.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49378

Details

Provenance
dumbbellAuthored on Feb 25 2025, 11:22 PM
Reviewer
bz
Differential Revision
D49378: linuxkpi: Add `BIN_ATTR*()` macros
Parents
rGe5d57a886bbc: linuxkpi: Add `queue_work_node()`
Branches
Unknown
Tags
Unknown