Skip to content

Commit 236ad35

Browse files
committed
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
1 parent e189470 commit 236ad35

7 files changed

Lines changed: 2 additions & 9 deletions

File tree

drivers/acpi/ac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <linux/acpi.h>
2222
#include <acpi/battery.h>
2323

24-
#define ACPI_AC_CLASS "ac_adapter"
2524
#define ACPI_AC_FILE_STATE "state"
2625
#define ACPI_AC_NOTIFY_STATUS 0x80
2726
#define ACPI_AC_STATUS_OFFLINE 0x00

drivers/acpi/sbs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include "sbshc.h"
2828

29-
#define ACPI_AC_CLASS "ac_adapter"
3029
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
3130
#define ACPI_BATTERY_DIR_NAME "BAT%i"
3231
#define ACPI_AC_DIR_NAME "AC0"

drivers/gpu/drm/amd/include/amd_acpi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
#include <linux/types.h>
2828

29-
#define ACPI_AC_CLASS "ac_adapter"
30-
3129
struct atif_verify_interface {
3230
u16 size; /* structure size in bytes (includes size field) */
3331
u16 version; /* version */

drivers/gpu/drm/radeon/radeon_acpi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ bool radeon_atpx_dgpu_req_power_for_displays(void);
4444
static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false; }
4545
#endif
4646

47-
#define ACPI_AC_CLASS "ac_adapter"
48-
4947
struct atif_verify_interface {
5048
u16 size; /* structure size in bytes (includes size field) */
5149
u16 version; /* version */

drivers/platform/x86/hp/hp-wmi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ enum hp_ec_offsets {
5858
#define HP_POWER_LIMIT_DEFAULT 0x00
5959
#define HP_POWER_LIMIT_NO_CHANGE 0xFF
6060

61-
#define ACPI_AC_CLASS "ac_adapter"
62-
6361
#define zero_if_sup(tmp) (zero_insize_support?0:sizeof(tmp)) // use when zero insize is required
6462

6563
enum hp_thermal_profile_omen_v0 {

drivers/platform/x86/lenovo/wmi-capdata.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#define LENOVO_CAPABILITY_DATA_01_GUID "7A8F5407-CB67-4D6E-B547-39B3BE018154"
5454
#define LENOVO_FAN_TEST_DATA_GUID "B642801B-3D21-45DE-90AE-6E86F164FB21"
5555

56-
#define ACPI_AC_CLASS "ac_adapter"
5756
#define ACPI_AC_NOTIFY_STATUS 0x80
5857

5958
#define LWMI_FEATURE_ID_FAN_TEST 0x05

include/acpi/acpi_bus.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ struct acpi_bus_event {
613613
u32 data;
614614
};
615615

616+
#define ACPI_AC_CLASS "ac_adapter"
617+
616618
extern struct kobject *acpi_kobj;
617619
extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
618620
void acpi_bus_private_data_handler(acpi_handle, void *);

0 commit comments

Comments
 (0)