ACPI: AC: Define ACPI_AC_CLASS in one place

The ACPI_AC_CLASS symbol is defined in several places in the same way
which is rather unfortunate.

Instead, define it in one common header file (acpi_bus.h) so that it is
accessible to all of its users.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/6163384.MhkbZ0Pkbq@rafael.j.wysocki
This commit is contained in:
Rafael J. Wysocki
2026-03-13 14:03:46 +01:00
parent e18947038b
commit 236ad35816
7 changed files with 2 additions and 9 deletions

View File

@@ -21,7 +21,6 @@
#include <linux/acpi.h>
#include <acpi/battery.h>
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_FILE_STATE "state"
#define ACPI_AC_NOTIFY_STATUS 0x80
#define ACPI_AC_STATUS_OFFLINE 0x00

View File

@@ -26,7 +26,6 @@
#include "sbshc.h"
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
#define ACPI_BATTERY_DIR_NAME "BAT%i"
#define ACPI_AC_DIR_NAME "AC0"

View File

@@ -26,8 +26,6 @@
#include <linux/types.h>
#define ACPI_AC_CLASS "ac_adapter"
struct atif_verify_interface {
u16 size; /* structure size in bytes (includes size field) */
u16 version; /* version */

View File

@@ -44,8 +44,6 @@ bool radeon_atpx_dgpu_req_power_for_displays(void);
static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false; }
#endif
#define ACPI_AC_CLASS "ac_adapter"
struct atif_verify_interface {
u16 size; /* structure size in bytes (includes size field) */
u16 version; /* version */

View File

@@ -58,8 +58,6 @@ enum hp_ec_offsets {
#define HP_POWER_LIMIT_DEFAULT 0x00
#define HP_POWER_LIMIT_NO_CHANGE 0xFF
#define ACPI_AC_CLASS "ac_adapter"
#define zero_if_sup(tmp) (zero_insize_support?0:sizeof(tmp)) // use when zero insize is required
enum hp_thermal_profile_omen_v0 {

View File

@@ -53,7 +53,6 @@
#define LENOVO_CAPABILITY_DATA_01_GUID "7A8F5407-CB67-4D6E-B547-39B3BE018154"
#define LENOVO_FAN_TEST_DATA_GUID "B642801B-3D21-45DE-90AE-6E86F164FB21"
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_NOTIFY_STATUS 0x80
#define LWMI_FEATURE_ID_FAN_TEST 0x05

View File

@@ -613,6 +613,8 @@ struct acpi_bus_event {
u32 data;
};
#define ACPI_AC_CLASS "ac_adapter"
extern struct kobject *acpi_kobj;
extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
void acpi_bus_private_data_handler(acpi_handle, void *);