mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
Merge branches 'acpi-x86', 'acpi-platform-profile', 'acpi-apei' and 'acpi-misc'
Merge an ACPI CPPC update, ACPI platform-profile driver updates, an ACPI APEI update and a MAINTAINERS update related to ACPI for 6.15-rc1: - Add a missing header file include to the x86 arch CPPC code (Mario Limonciello). - Rework the sysfs attributes implementation in the ACPI platform-profile driver and improve the unregistration code in it (Nathan Chancellor, Kurt Borja). - Prevent the ACPI HED driver from being built as a module and change its initcall level to subsys_initcall to avoid initialization ordering issues related to it (Xiaofei Tan). - Update a maintainer email address in the ACPI PMIC entry in MAINTAINERS (Mika Westerberg). * acpi-x86: x86/ACPI: CPPC: Add missing include * acpi-platform-profile: ACPI: platform_profile: Improve platform_profile_unregister() ACPI: platform-profile: Fix CFI violation when accessing sysfs files * acpi-apei: ACPI: HED: Always initialize before evged * acpi-misc: MAINTAINERS: Use my kernel.org address for ACPI PMIC work
This commit is contained in:
commit
8b30d2a396
|
|
@ -355,7 +355,7 @@ ACPI PMIC DRIVERS
|
|||
M: "Rafael J. Wysocki" <rafael@kernel.org>
|
||||
M: Len Brown <lenb@kernel.org>
|
||||
R: Andy Shevchenko <andy@kernel.org>
|
||||
R: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
R: Mika Westerberg <westeri@kernel.org>
|
||||
L: linux-acpi@vger.kernel.org
|
||||
S: Supported
|
||||
Q: https://patchwork.kernel.org/project/linux-acpi/list/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
* Copyright (c) 2016, Intel Corporation.
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
#include <acpi/cppc_acpi.h>
|
||||
#include <asm/msr.h>
|
||||
#include <asm/processor.h>
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ config ACPI_SBS
|
|||
the modules will be called sbs and sbshc.
|
||||
|
||||
config ACPI_HED
|
||||
tristate "Hardware Error Device"
|
||||
bool "Hardware Error Device"
|
||||
help
|
||||
This driver supports the Hardware Error Device (PNP0C33),
|
||||
which is used to report some hardware errors notified via
|
||||
|
|
|
|||
|
|
@ -80,7 +80,12 @@ static struct acpi_driver acpi_hed_driver = {
|
|||
.remove = acpi_hed_remove,
|
||||
},
|
||||
};
|
||||
module_acpi_driver(acpi_hed_driver);
|
||||
|
||||
static int __init acpi_hed_driver_init(void)
|
||||
{
|
||||
return acpi_bus_register_driver(&acpi_hed_driver);
|
||||
}
|
||||
subsys_initcall(acpi_hed_driver_init);
|
||||
|
||||
MODULE_AUTHOR("Huang Ying");
|
||||
MODULE_DESCRIPTION("ACPI Hardware Error Device Driver");
|
||||
|
|
|
|||
|
|
@ -289,14 +289,14 @@ static int _remove_hidden_choices(struct device *dev, void *arg)
|
|||
|
||||
/**
|
||||
* platform_profile_choices_show - Show the available profile choices for legacy sysfs interface
|
||||
* @dev: The device
|
||||
* @kobj: The kobject
|
||||
* @attr: The attribute
|
||||
* @buf: The buffer to write to
|
||||
*
|
||||
* Return: The number of bytes written
|
||||
*/
|
||||
static ssize_t platform_profile_choices_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
static ssize_t platform_profile_choices_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct aggregate_choices_data data = {
|
||||
|
|
@ -371,14 +371,14 @@ static int _store_and_notify(struct device *dev, void *data)
|
|||
|
||||
/**
|
||||
* platform_profile_show - Show the current profile for legacy sysfs interface
|
||||
* @dev: The device
|
||||
* @kobj: The kobject
|
||||
* @attr: The attribute
|
||||
* @buf: The buffer to write to
|
||||
*
|
||||
* Return: The number of bytes written
|
||||
*/
|
||||
static ssize_t platform_profile_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
static ssize_t platform_profile_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
enum platform_profile_option profile = PLATFORM_PROFILE_LAST;
|
||||
|
|
@ -400,15 +400,15 @@ static ssize_t platform_profile_show(struct device *dev,
|
|||
|
||||
/**
|
||||
* platform_profile_store - Set the profile for legacy sysfs interface
|
||||
* @dev: The device
|
||||
* @kobj: The kobject
|
||||
* @attr: The attribute
|
||||
* @buf: The buffer to read from
|
||||
* @count: The number of bytes to read
|
||||
*
|
||||
* Return: The number of bytes read
|
||||
*/
|
||||
static ssize_t platform_profile_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
static ssize_t platform_profile_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct aggregate_choices_data data = {
|
||||
|
|
@ -442,12 +442,12 @@ static ssize_t platform_profile_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RO(platform_profile_choices);
|
||||
static DEVICE_ATTR_RW(platform_profile);
|
||||
static struct kobj_attribute attr_platform_profile_choices = __ATTR_RO(platform_profile_choices);
|
||||
static struct kobj_attribute attr_platform_profile = __ATTR_RW(platform_profile);
|
||||
|
||||
static struct attribute *platform_profile_attrs[] = {
|
||||
&dev_attr_platform_profile_choices.attr,
|
||||
&dev_attr_platform_profile.attr,
|
||||
&attr_platform_profile_choices.attr,
|
||||
&attr_platform_profile.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -627,24 +627,23 @@ EXPORT_SYMBOL_GPL(platform_profile_register);
|
|||
/**
|
||||
* platform_profile_remove - Unregisters a platform profile class device
|
||||
* @dev: Class device
|
||||
*
|
||||
* Return: 0
|
||||
*/
|
||||
int platform_profile_remove(struct device *dev)
|
||||
void platform_profile_remove(struct device *dev)
|
||||
{
|
||||
struct platform_profile_handler *pprof = to_pprof_handler(dev);
|
||||
int id;
|
||||
struct platform_profile_handler *pprof;
|
||||
|
||||
if (IS_ERR_OR_NULL(dev))
|
||||
return;
|
||||
|
||||
pprof = to_pprof_handler(dev);
|
||||
|
||||
guard(mutex)(&profile_lock);
|
||||
|
||||
id = pprof->minor;
|
||||
ida_free(&platform_profile_ida, pprof->minor);
|
||||
device_unregister(&pprof->dev);
|
||||
ida_free(&platform_profile_ida, id);
|
||||
|
||||
sysfs_notify(acpi_kobj, NULL, "platform_profile");
|
||||
|
||||
sysfs_update_group(acpi_kobj, &platform_profile_group);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(platform_profile_remove);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ struct platform_profile_ops {
|
|||
struct device *platform_profile_register(struct device *dev, const char *name,
|
||||
void *drvdata,
|
||||
const struct platform_profile_ops *ops);
|
||||
int platform_profile_remove(struct device *dev);
|
||||
void platform_profile_remove(struct device *dev);
|
||||
struct device *devm_platform_profile_register(struct device *dev, const char *name,
|
||||
void *drvdata,
|
||||
const struct platform_profile_ops *ops);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user