Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: Move definition of PREFIX from acpi_bus.h to internal..h

Linux/ACPI core files using internal.h all PREFIX "ACPI: ",
however, not all ACPI drivers use/want it -- and they
should not have to #undef PREFIX to define their own.

Add GPL commment to internal.h while we are there.

This does not change any actual console output,
asside from a whitespace fix.

Signed-off-by: Len Brown <len.brown@intel.com>

Len Brown a192a958 2a4ab640

+80 -9
+2
arch/x86/pci/mmconfig-shared.c
··· 18 18 #include <asm/e820.h> 19 19 #include <asm/pci_x86.h> 20 20 21 + #define PREFIX "ACPI: " 22 + 21 23 /* aperture is up to 256MB but BIOS may reserve less */ 22 24 #define MMCONFIG_APER_MIN (2 * 1024*1024) 23 25 #define MMCONFIG_APER_MAX (256 * 1024*1024)
+2
drivers/acpi/ac.c
··· 37 37 #include <acpi/acpi_bus.h> 38 38 #include <acpi/acpi_drivers.h> 39 39 40 + #define PREFIX "ACPI: " 41 + 40 42 #define ACPI_AC_CLASS "ac_adapter" 41 43 #define ACPI_AC_DEVICE_NAME "AC Adapter" 42 44 #define ACPI_AC_FILE_STATE "state"
+2
drivers/acpi/battery.c
··· 45 45 #include <linux/power_supply.h> 46 46 #endif 47 47 48 + #define PREFIX "ACPI: " 49 + 48 50 #define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF 49 51 50 52 #define ACPI_BATTERY_CLASS "battery"
+2
drivers/acpi/blacklist.c
··· 34 34 #include <acpi/acpi_bus.h> 35 35 #include <linux/dmi.h> 36 36 37 + #include "internal.h" 38 + 37 39 enum acpi_blacklist_predicates { 38 40 all_versions, 39 41 less_than_or_equal,
+2
drivers/acpi/button.c
··· 33 33 #include <acpi/acpi_bus.h> 34 34 #include <acpi/acpi_drivers.h> 35 35 36 + #define PREFIX "ACPI: " 37 + 36 38 #define ACPI_BUTTON_CLASS "button" 37 39 #define ACPI_BUTTON_FILE_INFO "info" 38 40 #define ACPI_BUTTON_FILE_STATE "state"
+2
drivers/acpi/cm_sbs.c
··· 28 28 #include <acpi/acpi_bus.h> 29 29 #include <acpi/acpi_drivers.h> 30 30 31 + #define PREFIX "ACPI: " 32 + 31 33 ACPI_MODULE_NAME("cm_sbs"); 32 34 #define ACPI_AC_CLASS "ac_adapter" 33 35 #define ACPI_BATTERY_CLASS "battery"
+2
drivers/acpi/container.c
··· 35 35 #include <acpi/acpi_drivers.h> 36 36 #include <acpi/container.h> 37 37 38 + #define PREFIX "ACPI: " 39 + 38 40 #define ACPI_CONTAINER_DEVICE_NAME "ACPI container device" 39 41 #define ACPI_CONTAINER_CLASS "container" 40 42
+2
drivers/acpi/dock.c
··· 33 33 #include <acpi/acpi_bus.h> 34 34 #include <acpi/acpi_drivers.h> 35 35 36 + #define PREFIX "ACPI: " 37 + 36 38 #define ACPI_DOCK_DRIVER_DESCRIPTION "ACPI Dock Station Driver" 37 39 38 40 ACPI_MODULE_NAME("dock");
-1
drivers/acpi/ec.c
··· 47 47 #define ACPI_EC_DEVICE_NAME "Embedded Controller" 48 48 #define ACPI_EC_FILE_INFO "info" 49 49 50 - #undef PREFIX 51 50 #define PREFIX "ACPI: EC: " 52 51 53 52 /* EC status register */
+2
drivers/acpi/event.c
··· 14 14 #include <net/netlink.h> 15 15 #include <net/genetlink.h> 16 16 17 + #include "internal.h" 18 + 17 19 #define _COMPONENT ACPI_SYSTEM_COMPONENT 18 20 ACPI_MODULE_NAME("event"); 19 21
+2
drivers/acpi/fan.c
··· 34 34 #include <acpi/acpi_bus.h> 35 35 #include <acpi/acpi_drivers.h> 36 36 37 + #define PREFIX "ACPI: " 38 + 37 39 #define ACPI_FAN_CLASS "fan" 38 40 #define ACPI_FAN_FILE_STATE "state" 39 41
+2
drivers/acpi/glue.c
··· 12 12 #include <linux/rwsem.h> 13 13 #include <linux/acpi.h> 14 14 15 + #include "internal.h" 16 + 15 17 #define ACPI_GLUE_DEBUG 0 16 18 #if ACPI_GLUE_DEBUG 17 19 #define DBG(x...) printk(PREFIX x)
+21 -1
drivers/acpi/internal.h
··· 1 - /* For use by Linux/ACPI infrastructure, not drivers */ 1 + /* 2 + * acpi/internal.h 3 + * For use by Linux/ACPI infrastructure, not drivers 4 + * 5 + * Copyright (c) 2009, Intel Corporation. 6 + * 7 + * This program is free software; you can redistribute it and/or modify it 8 + * under the terms and conditions of the GNU General Public License, 9 + * version 2, as published by the Free Software Foundation. 10 + * 11 + * This program is distributed in the hope it will be useful, but WITHOUT 12 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 + * more details. 15 + * 16 + * You should have received a copy of the GNU General Public License along with 17 + * this program; if not, write to the Free Software Foundation, Inc., 18 + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 19 + */ 20 + 21 + #define PREFIX "ACPI: " 2 22 3 23 int init_acpi_device_notify(void); 4 24 int acpi_scan_init(void);
+2
drivers/acpi/numa.c
··· 30 30 #include <linux/acpi.h> 31 31 #include <acpi/acpi_bus.h> 32 32 33 + #define PREFIX "ACPI: " 34 + 33 35 #define ACPI_NUMA 0x80000000 34 36 #define _COMPONENT ACPI_NUMA 35 37 ACPI_MODULE_NAME("numa");
+2
drivers/acpi/pci_irq.c
··· 40 40 #include <acpi/acpi_bus.h> 41 41 #include <acpi/acpi_drivers.h> 42 42 43 + #define PREFIX "ACPI: " 44 + 43 45 #define _COMPONENT ACPI_PCI_COMPONENT 44 46 ACPI_MODULE_NAME("pci_irq"); 45 47
+2
drivers/acpi/pci_link.c
··· 43 43 #include <acpi/acpi_bus.h> 44 44 #include <acpi/acpi_drivers.h> 45 45 46 + #define PREFIX "ACPI: " 47 + 46 48 #define _COMPONENT ACPI_PCI_COMPONENT 47 49 ACPI_MODULE_NAME("pci_link"); 48 50 #define ACPI_PCI_LINK_CLASS "pci_irq_routing"
+2
drivers/acpi/pci_root.c
··· 36 36 #include <acpi/acpi_bus.h> 37 37 #include <acpi/acpi_drivers.h> 38 38 39 + #define PREFIX "ACPI: " 40 + 39 41 #define _COMPONENT ACPI_PCI_COMPONENT 40 42 ACPI_MODULE_NAME("pci_root"); 41 43 #define ACPI_PCI_ROOT_CLASS "pci_bridge"
+2
drivers/acpi/power.c
··· 44 44 #include <acpi/acpi_bus.h> 45 45 #include <acpi/acpi_drivers.h> 46 46 47 + #define PREFIX "ACPI: " 48 + 47 49 #define _COMPONENT ACPI_POWER_COMPONENT 48 50 ACPI_MODULE_NAME("power"); 49 51 #define ACPI_POWER_CLASS "power_resource"
+2
drivers/acpi/processor_core.c
··· 59 59 #include <acpi/acpi_drivers.h> 60 60 #include <acpi/processor.h> 61 61 62 + #define PREFIX "ACPI: " 63 + 62 64 #define ACPI_PROCESSOR_CLASS "processor" 63 65 #define ACPI_PROCESSOR_DEVICE_NAME "Processor" 64 66 #define ACPI_PROCESSOR_FILE_INFO "info"
+2
drivers/acpi/processor_idle.c
··· 60 60 #include <acpi/processor.h> 61 61 #include <asm/processor.h> 62 62 63 + #define PREFIX "ACPI: " 64 + 63 65 #define ACPI_PROCESSOR_CLASS "processor" 64 66 #define _COMPONENT ACPI_PROCESSOR_COMPONENT 65 67 ACPI_MODULE_NAME("processor_idle");
+2
drivers/acpi/processor_perflib.c
··· 39 39 #include <acpi/acpi_drivers.h> 40 40 #include <acpi/processor.h> 41 41 42 + #define PREFIX "ACPI: " 43 + 42 44 #define ACPI_PROCESSOR_CLASS "processor" 43 45 #define ACPI_PROCESSOR_FILE_PERFORMANCE "performance" 44 46 #define _COMPONENT ACPI_PROCESSOR_COMPONENT
+2
drivers/acpi/processor_thermal.c
··· 40 40 #include <acpi/processor.h> 41 41 #include <acpi/acpi_drivers.h> 42 42 43 + #define PREFIX "ACPI: " 44 + 43 45 #define ACPI_PROCESSOR_CLASS "processor" 44 46 #define _COMPONENT ACPI_PROCESSOR_COMPONENT 45 47 ACPI_MODULE_NAME("processor_thermal");
+2
drivers/acpi/processor_throttling.c
··· 41 41 #include <acpi/acpi_drivers.h> 42 42 #include <acpi/processor.h> 43 43 44 + #define PREFIX "ACPI: " 45 + 44 46 #define ACPI_PROCESSOR_CLASS "processor" 45 47 #define _COMPONENT ACPI_PROCESSOR_COMPONENT 46 48 ACPI_MODULE_NAME("processor_throttling");
+2
drivers/acpi/sbs.c
··· 46 46 47 47 #include "sbshc.h" 48 48 49 + #define PREFIX "ACPI: " 50 + 49 51 #define ACPI_SBS_CLASS "sbs" 50 52 #define ACPI_AC_CLASS "ac_adapter" 51 53 #define ACPI_BATTERY_CLASS "battery"
+2
drivers/acpi/sbshc.c
··· 15 15 #include <linux/interrupt.h> 16 16 #include "sbshc.h" 17 17 18 + #define PREFIX "ACPI: " 19 + 18 20 #define ACPI_SMB_HC_CLASS "smbus_host_controller" 19 21 #define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC" 20 22
+2
drivers/acpi/system.c
··· 31 31 32 32 #include <acpi/acpi_drivers.h> 33 33 34 + #define PREFIX "ACPI: " 35 + 34 36 #define _COMPONENT ACPI_SYSTEM_COMPONENT 35 37 ACPI_MODULE_NAME("system"); 36 38
+2
drivers/acpi/thermal.c
··· 47 47 #include <acpi/acpi_bus.h> 48 48 #include <acpi/acpi_drivers.h> 49 49 50 + #define PREFIX "ACPI: " 51 + 50 52 #define ACPI_THERMAL_CLASS "thermal_zone" 51 53 #define ACPI_THERMAL_DEVICE_NAME "Thermal Zone" 52 54 #define ACPI_THERMAL_FILE_STATE "state"
+2
drivers/acpi/utils.c
··· 30 30 #include <acpi/acpi_bus.h> 31 31 #include <acpi/acpi_drivers.h> 32 32 33 + #include "internal.h" 34 + 33 35 #define _COMPONENT ACPI_BUS_COMPONENT 34 36 ACPI_MODULE_NAME("utils"); 35 37
+2
drivers/acpi/video.c
··· 44 44 #include <acpi/acpi_bus.h> 45 45 #include <acpi/acpi_drivers.h> 46 46 47 + #define PREFIX "ACPI: " 48 + 47 49 #define ACPI_VIDEO_CLASS "video" 48 50 #define ACPI_VIDEO_BUS_NAME "Video Bus" 49 51 #define ACPI_VIDEO_DEVICE_NAME "Video Device"
+2
drivers/acpi/video_detect.c
··· 38 38 #include <linux/dmi.h> 39 39 #include <linux/pci.h> 40 40 41 + #define PREFIX "ACPI: " 42 + 41 43 ACPI_MODULE_NAME("video"); 42 44 #define _COMPONENT ACPI_VIDEO_COMPONENT 43 45
+1 -2
drivers/pci/dmar.c
··· 34 34 #include <linux/irq.h> 35 35 #include <linux/interrupt.h> 36 36 37 - #undef PREFIX 38 - #define PREFIX "DMAR:" 37 + #define PREFIX "DMAR: " 39 38 40 39 /* No locks are needed as DMA remapping hardware unit 41 40 * list is constructed at boot time and hotplug of
+2 -2
drivers/platform/x86/fujitsu-laptop.c
··· 700 700 goto end; 701 701 } 702 702 703 - printk(KERN_INFO PREFIX "%s [%s] (%s)\n", 703 + printk(KERN_INFO "ACPI: %s [%s] (%s)\n", 704 704 acpi_device_name(device), acpi_device_bid(device), 705 705 !device->power.state ? "on" : "off"); 706 706 ··· 874 874 goto end; 875 875 } 876 876 877 - printk(KERN_INFO PREFIX "%s [%s] (%s)\n", 877 + printk(KERN_INFO "ACPI: %s [%s] (%s)\n", 878 878 acpi_device_name(device), acpi_device_bid(device), 879 879 !device->power.state ? "on" : "off"); 880 880
-1
drivers/platform/x86/wmi.c
··· 42 42 43 43 #define ACPI_WMI_CLASS "wmi" 44 44 45 - #undef PREFIX 46 45 #define PREFIX "ACPI: WMI: " 47 46 48 47 static DEFINE_MUTEX(wmi_data_lock);
-2
include/acpi/acpi_bus.h
··· 30 30 31 31 #include <acpi/acpi.h> 32 32 33 - #define PREFIX "ACPI: " 34 - 35 33 /* TBD: Make dynamic */ 36 34 #define ACPI_MAX_HANDLES 10 37 35 struct acpi_handle_list {