[PATCH] ACPICA: actbl2: change to be16/be32 types for big endian data

2023-07-03 Thread Ben Dooks
Some of the fields in struct acpi_nfit_control_region are used in big endian format, and thus are generatng warnings from spare where the member is passed to one of the conversion functions. Fix the following sparse warnings by changing the data types: drivers/acpi/nfit/core.c:1403:41: warning:

[PATCH] ACPI: NFIT: add helper to_nfit_mem() to take device to nfit_mem

2023-07-03 Thread Ben Dooks
Add a quick helper to just do struct device to the struct nfit_mem field it should be referencing. This reduces the number of code lines in some of the followgn code as it removes the intermediate struct nvdimm. Signed-off-by: Ben Dooks --- drivers/acpi/nfit/core.c | 27

[PATCH v7 9/9] acpi/thermal: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 8/9] acpi/nfit: Remove unnecessary .remove callback

2023-07-03 Thread Michal Wilczynski
Nfit driver doesn't use .remove() callback and provide an empty function as it's .remove() callback. Remove empty acpi_nfit_remove() and initialization of callback. Suggested-by: Dan Williams Signed-off-by: Michal Wilczynski --- drivers/acpi/nfit/core.c | 6 -- 1 file changed, 6

[PATCH v7 7/9] acpi/nfit: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 6/9] acpi/hed: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 5/9] acpi/battery: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 4/9] acpi/video: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 3/9] acpi/ac: Move handler installing logic to driver

2023-07-03 Thread Michal Wilczynski
Currently logic for installing notifications from ACPI devices is implemented using notify callback in struct acpi_driver. Preparations are being made to replace acpi_driver with more generic struct platform_driver, which doesn't contain notify callback. Furthermore as of now handlers are being

[PATCH v7 1/9] acpi/bus: Introduce wrappers for ACPICA event handler install/remove

2023-07-03 Thread Michal Wilczynski
Introduce new acpi_dev_install_notify_handler() and acpi_dev_remove_notify_handler(). Those functions are replacing old installers, and after all drivers switch to the new model, old installers will be removed. Make acpi_dev_install_notify_handler() and acpi_dev_remove_notify_handler()

[PATCH v7 2/9] acpi/bus: Set driver_data to NULL every time .add() fails

2023-07-03 Thread Michal Wilczynski
Most drivers set driver_data during .add() callback, but usually they don't set it back to NULL in case of a failure. Set driver_data to NULL in acpi_device_probe() to avoid code duplication. Signed-off-by: Michal Wilczynski --- drivers/acpi/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH v7 0/9] Remove .notify callback in acpi_device_ops

2023-07-03 Thread Michal Wilczynski
*** IMPORTANT *** This is part 1 - only drivers in acpi directory to ease up review process. Rest of the drivers will be handled in separate patchsets. Currently drivers support ACPI event handlers by defining .notify callback in acpi_device_ops. This solution is suboptimal as event handler