[PATCH 1/3] ACPI / battery: move definition ACPI_BATTERY_CLASS to header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACPI_BATTERY_CLASS is used in multiple places.
Create a header file for it, and replace copies with #include.

Signed-off-by: Alexander Mezin <mezin.alexander@xxxxxxxxx>
---
 drivers/acpi/battery.c | 3 ++-
 drivers/acpi/battery.h | 6 ++++++
 drivers/acpi/sbs.c     | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 drivers/acpi/battery.h

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 797a693..0a19c8f 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -39,11 +39,12 @@
 #include <linux/acpi.h>
 #include <linux/power_supply.h>
 
+#include "battery.h"
+
 #define PREFIX "ACPI: "
 
 #define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
 
-#define ACPI_BATTERY_CLASS		"battery"
 #define ACPI_BATTERY_DEVICE_NAME	"Battery"
 #define ACPI_BATTERY_NOTIFY_STATUS	0x80
 #define ACPI_BATTERY_NOTIFY_INFO	0x81
diff --git a/drivers/acpi/battery.h b/drivers/acpi/battery.h
new file mode 100644
index 0000000..785373c
--- /dev/null
+++ b/drivers/acpi/battery.h
@@ -0,0 +1,6 @@
+#ifndef __ACPI_BATTERY_H
+#define __ACPI_BATTERY_H
+
+#define ACPI_BATTERY_CLASS "battery"
+
+#endif
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index dbd4849..366ca40 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -37,12 +37,12 @@
 #include <linux/power_supply.h>
 
 #include "sbshc.h"
+#include "battery.h"
 
 #define PREFIX "ACPI: "
 
 #define ACPI_SBS_CLASS			"sbs"
 #define ACPI_AC_CLASS			"ac_adapter"
-#define ACPI_BATTERY_CLASS		"battery"
 #define ACPI_SBS_DEVICE_NAME		"Smart Battery System"
 #define ACPI_SBS_FILE_INFO		"info"
 #define ACPI_SBS_FILE_STATE		"state"
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux