linux-stable/drivers/cdx
Nathan Chancellor 5852357d55 cdx: Fix cdx_mmap_resource() after constifying attr in ->mmap()
Commit 94a20fb9af ("sysfs: treewide: constify attribute callback of
bin_attribute::mmap()") missed updating the attr parameter of
cdx_mmap_resource(), resulting in a build failure.

  drivers/cdx/cdx.c: In function 'cdx_create_res_attr':
  drivers/cdx/cdx.c:773:24: error: assignment to 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, struct vm_area_struct *)' from incompatible pointer type 'int (*)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *)' [-Wincompatible-pointer-types]
    773 |         res_attr->mmap = cdx_mmap_resource;
        |                        ^

Update cdx_mmap_resource() to match, resolving the build failure.

Fixes: 94a20fb9af ("sysfs: treewide: constify attribute callback of bin_attribute::mmap()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Reviewed-by: Thomas Weißschuu <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241107-sysfs-const-mmap-fix-cdx-v1-1-2ed9b7cd5f8b@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-10 10:53:21 +01:00
..
controller cdx: remove unused struct 'cdx_mcdi_copy_buffer' 2024-07-31 13:56:50 +02:00
cdx_msi.c cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
cdx.c cdx: Fix cdx_mmap_resource() after constifying attr in ->mmap() 2024-11-10 10:53:21 +01:00
cdx.h cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
Kconfig cdx: add MCDI protocol interface for firmware interaction 2023-03-29 12:26:32 +02:00
Makefile cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00