* [PATCH 02/12] acer-wmi: fix section mismatch warnings
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 03/12] ACPI: fix section mismatch in acpi_pci_root_add Len Brown
` (9 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Sam Ravnborg, Carlos Corbacho, Len Brown
From: Sam Ravnborg <sam@ravnborg.org>
Fix following warnings:
WARNING: vmlinux.o(.text+0x672615): Section mismatch in reference from the function acer_platform_remove() to the function .exit.text:acer_backlight_exit()
WARNING: vmlinux.o(.devinit.text+0x1e859): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_led_init()
WARNING: vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_backlight_init()
Remove __exit annotation from acer_backlight_exit(). We cannot reference
a __exit annotated function from non __exit functions.
acer_led_init() and acer_backlight_init() where both annotated __init but
used from a __devinit function. This would result in an oops should
gcc drop their inlining and the module are hot plugged.
Fix by annotating acer_led_init() and acer_backlight_init() __devinit.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/misc/acer-wmi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index d7aea93..cdc733b 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -756,7 +756,7 @@ static struct led_classdev mail_led = {
.brightness_set = mail_led_set,
};
-static int __init acer_led_init(struct device *dev)
+static int __devinit acer_led_init(struct device *dev)
{
return led_classdev_register(dev, &mail_led);
}
@@ -789,7 +789,7 @@ static struct backlight_ops acer_bl_ops = {
.update_status = update_bl_status,
};
-static int __init acer_backlight_init(struct device *dev)
+static int __devinit acer_backlight_init(struct device *dev)
{
struct backlight_device *bd;
@@ -808,7 +808,7 @@ static int __init acer_backlight_init(struct device *dev)
return 0;
}
-static void __exit acer_backlight_exit(void)
+static void acer_backlight_exit(void)
{
backlight_device_unregister(acer_backlight_device);
}
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 03/12] ACPI: fix section mismatch in acpi_pci_root_add
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
2008-03-11 6:51 ` [PATCH 02/12] acer-wmi: fix section mismatch warnings Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 04/12] sony-laptop.c: fix off-by-one Len Brown
` (8 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Sam Ravnborg, Len Brown
From: Sam Ravnborg <sam@ravnborg.org>
Fix following warning:
WARNING: vmlinux.o(.text+0x550e85): Section mismatch in reference from the function acpi_pci_root_add() to the function .devinit.text:pci_acpi_scan_root()
acpi_pci_root_add uses a __devinit annotated function and
it looks like annotating it __devinit too is the correct fix.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/pci_root.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index f14ff1f..c3fed31 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device)
}
}
-static int acpi_pci_root_add(struct acpi_device *device)
+static int __devinit acpi_pci_root_add(struct acpi_device *device)
{
int result = 0;
struct acpi_pci_root *root = NULL;
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 04/12] sony-laptop.c: fix off-by-one
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
2008-03-11 6:51 ` [PATCH 02/12] acer-wmi: fix section mismatch warnings Len Brown
2008-03-11 6:51 ` [PATCH 03/12] ACPI: fix section mismatch in acpi_pci_root_add Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 05/12] ACPI: Do not pass NULL to acpi_get_handle() when looking for _EJD Len Brown
` (7 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Adrian Bunk, Len Brown
From: Adrian Bunk <bunk@kernel.org>
This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/misc/sony-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 899e3f7..02ff3d1 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event)
break;
default:
- if (event > ARRAY_SIZE(sony_laptop_input_index)) {
+ if (event >= ARRAY_SIZE(sony_laptop_input_index)) {
dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
break;
}
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 05/12] ACPI: Do not pass NULL to acpi_get_handle() when looking for _EJD
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (2 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 04/12] sony-laptop.c: fix off-by-one Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 06/12] ACPI: prevent randconfig build failure on empty ACPI_CUSTOM_DSDT_FILE Len Brown
` (6 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Holger Macht, Len Brown
From: Holger Macht <hmacht@suse.de>
When trying to get the acpi_handle from an acpi_buffer, pass
ACPI_ROOT_OBJECT instead of NULL to acpi_get_handle(). This fixes the
detection of dock dependent bays.
Signed-off-by: Holger Macht <hmacht@suse.de>
Tested-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/scan.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 3fac011..d9b9143 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
if (ACPI_SUCCESS(status)) {
obj = buffer.pointer;
- status = acpi_get_handle(NULL, obj->string.pointer, ejd);
+ status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer,
+ ejd);
kfree(buffer.pointer);
}
return status;
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 06/12] ACPI: prevent randconfig build failure on empty ACPI_CUSTOM_DSDT_FILE
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (3 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 05/12] ACPI: Do not pass NULL to acpi_get_handle() when looking for _EJD Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 07/12] ACPI: acpi_pci_set_power_state() cleanups Len Brown
` (5 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Randy Dunlap, Len Brown
From: Randy Dunlap <randy.dunlap@oracle.com>
Make ACPI_CUSTOM_DSDT boolean config symbol a hidden and derived
value, based on the value of ACPI_CUSTOM_DSDT_FILE (string).
Only the latter is presented to the user as a config option.
This fixes problems with "make randconfig" setting ACPI_CUSTOM_DSDT
but leaving ACPI_CUSTOM_DSDT_FILE empty/blank.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/Kconfig | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index f688c21..fbcaa06 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -283,24 +283,23 @@ config ACPI_TOSHIBA
If you have a legacy free Toshiba laptop (such as the Libretto L1
series), say Y.
-config ACPI_CUSTOM_DSDT
- bool "Include Custom DSDT"
+config ACPI_CUSTOM_DSDT_FILE
+ string "Custom DSDT Table file to include"
+ default ""
depends on !STANDALONE
- default n
help
This option supports a custom DSDT by linking it into the kernel.
See Documentation/acpi/dsdt-override.txt
- If unsure, say N.
-
-config ACPI_CUSTOM_DSDT_FILE
- string "Custom DSDT Table file to include"
- depends on ACPI_CUSTOM_DSDT
- default ""
- help
Enter the full path name to the file which includes the AmlCode
declaration.
+ If unsure, don't enter a file name.
+
+config ACPI_CUSTOM_DSDT
+ bool
+ default ACPI_CUSTOM_DSDT_FILE != ""
+
config ACPI_CUSTOM_DSDT_INITRD
bool "Read Custom DSDT from initramfs"
depends on BLK_DEV_INITRD
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 07/12] ACPI: acpi_pci_set_power_state() cleanups
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (4 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 06/12] ACPI: prevent randconfig build failure on empty ACPI_CUSTOM_DSDT_FILE Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 08/12] ACPI Exception (): AE_NOT_FOUND, Processor Device is not present (update) Len Brown
` (4 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: David Brownell, David Brownell, Len Brown
From: David Brownell <david-b@pacbell.net>
Minor cleanups to acpi_pci_set_power_state(): use the ACPI and PCI
state symbols to make clear that a mapping is being done between PCI
and ACPI states, instead of using magic numbers. For paranoia's sake,
report any errors. Save five bytes (x86_64) too.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/pci/pci-acpi.c | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 4a23654..72f7476 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
{
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
acpi_handle tmp;
- static int state_conv[] = {
- [0] = 0,
- [1] = 1,
- [2] = 2,
- [3] = 3,
- [4] = 3
+ static const u8 state_conv[] = {
+ [PCI_D0] = ACPI_STATE_D0,
+ [PCI_D1] = ACPI_STATE_D1,
+ [PCI_D2] = ACPI_STATE_D2,
+ [PCI_D3hot] = ACPI_STATE_D3,
+ [PCI_D3cold] = ACPI_STATE_D3
};
- int acpi_state = state_conv[(int __force) state];
if (!handle)
return -ENODEV;
/* If the ACPI device has _EJ0, ignore the device */
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp)))
return 0;
- return acpi_bus_set_power(handle, acpi_state);
+
+ switch (state) {
+ case PCI_D0:
+ case PCI_D1:
+ case PCI_D2:
+ case PCI_D3hot:
+ case PCI_D3cold:
+ return acpi_bus_set_power(handle, state_conv[state]);
+ }
+ return -EINVAL;
}
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 08/12] ACPI Exception (): AE_NOT_FOUND, Processor Device is not present (update)
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (5 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 07/12] ACPI: acpi_pci_set_power_state() cleanups Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 09/12] ACPI: fix boot oops regression in thermal Len Brown
` (3 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Zhang Rui, Len Brown
From: Zhang Rui <rui.zhang@intel.com>
update cfaf3747ff3d431fba33f75083b7f50f58ae22ff
ACPI: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present
is_processor_present is only called in the processor hotplug case,
and _STA method is mandatory at this time.
We should ignore those processors that are disabled in the MADT
and don't have _STA methods.
Because they will never exist in this system.
For the processors that don't physically exist but can be
hot plugged later, we still need this debug info.
http://bugzilla.kernel.org/show_bug.cgi?id=8570
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/processor_core.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index a3cc8a9..d9316ab 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -840,17 +840,19 @@ static int is_processor_present(acpi_handle handle)
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
- /*
- * if a processor object does not have an _STA object,
- * OSPM assumes that the processor is present.
- */
- if (status == AE_NOT_FOUND)
- return 1;
if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
return 1;
- ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
+ /*
+ * _STA is mandatory for a processor that supports hot plug
+ */
+ if (status == AE_NOT_FOUND)
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+ "Processor does not support hot plug\n"));
+ else
+ ACPI_EXCEPTION((AE_INFO, status,
+ "Processor Device is not present"));
return 0;
}
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 09/12] ACPI: fix boot oops regression in thermal
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (6 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 08/12] ACPI Exception (): AE_NOT_FOUND, Processor Device is not present (update) Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 10/12] Revert "ACPI: EC: Use proper handle for boot EC" Len Brown
` (2 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Lin Ming, Zhang Rui, Len Brown
From: Lin Ming <ming.m.lin@intel.com>
Fix a memory overflow bug when copying
NULL internal package element object to external.
http://bugzilla.kernel.org/show_bug.cgi?id=10132
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/utilities/utobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
index 76ee766..e08b3fa 100644
--- a/drivers/acpi/utilities/utobject.c
+++ b/drivers/acpi/utilities/utobject.c
@@ -432,7 +432,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
* element -- which is legal)
*/
if (!internal_object) {
- *obj_length = 0;
+ *obj_length = sizeof(union acpi_object);
return_ACPI_STATUS(AE_OK);
}
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 10/12] Revert "ACPI: EC: Use proper handle for boot EC"
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (7 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 09/12] ACPI: fix boot oops regression in thermal Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 11/12] ACPI: Fix a duplicate log level Len Brown
2008-03-11 6:51 ` [PATCH 12/12] ACPI: replace remaining __FUNCTION__ occurrences Len Brown
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
From: Len Brown <len.brown@intel.com>
This reverts commit 208c70a45624400fafd7511b96bc426bf01f8f5e.
http://bugzilla.kernel.org/show_bug.cgi?id=10100
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/ec.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index caf873c..7222a18 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -943,11 +943,7 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec->command_addr = ecdt_ptr->control.address;
boot_ec->data_addr = ecdt_ptr->data.address;
boot_ec->gpe = ecdt_ptr->gpe;
- if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
- &boot_ec->handle))) {
- pr_info("Failed to locate handle for boot EC\n");
- boot_ec->handle = ACPI_ROOT_OBJECT;
- }
+ boot_ec->handle = ACPI_ROOT_OBJECT;
} else {
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 11/12] ACPI: Fix a duplicate log level
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (8 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 10/12] Revert "ACPI: EC: Use proper handle for boot EC" Len Brown
@ 2008-03-11 6:51 ` Len Brown
2008-03-11 6:51 ` [PATCH 12/12] ACPI: replace remaining __FUNCTION__ occurrences Len Brown
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Jean Delvare, Len Brown
From: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/osl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 8edba7b..065819b 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1237,7 +1237,7 @@ int acpi_check_resource_conflict(struct resource *res)
if (clash) {
if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) {
- printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]"
+ printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
" conflicts with ACPI region %s"
" [0x%llx-0x%llx]\n",
acpi_enforce_resources == ENFORCE_RESOURCES_LAX
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 12/12] ACPI: replace remaining __FUNCTION__ occurrences
2008-03-11 6:51 ` [PATCH 01/12] ACPI: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify Len Brown
` (9 preceding siblings ...)
2008-03-11 6:51 ` [PATCH 11/12] ACPI: Fix a duplicate log level Len Brown
@ 2008-03-11 6:51 ` Len Brown
10 siblings, 0 replies; 17+ messages in thread
From: Len Brown @ 2008-03-11 6:51 UTC (permalink / raw)
To: linux-acpi; +Cc: Harvey Harrison, Len Brown
From: Harvey Harrison <harvey.harrison@gmail.com>
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/bus.c | 2 +-
drivers/acpi/scan.c | 2 +-
drivers/acpi/sleep/main.c | 2 +-
drivers/acpi/utilities/utdebug.c | 2 +-
drivers/acpi/video.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index ce3c0a2..5b6760e 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -776,7 +776,7 @@ static int __init acpi_init(void)
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
if (!acpi_kobj) {
- printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__);
+ printk(KERN_WARNING "%s: kset create error\n", __func__);
acpi_kobj = NULL;
}
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 3fac011..b26e301 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device,
case ACPI_BUS_TYPE_DEVICE:
status = acpi_get_object_info(handle, &buffer);
if (ACPI_FAILURE(status)) {
- printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__);
+ printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__);
return;
}
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 293a1cb..d2f71a5 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void)
static void acpi_power_off(void)
{
/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
- printk("%s called\n", __FUNCTION__);
+ printk("%s called\n", __func__);
local_irq_disable();
acpi_enable_wakeup_device(ACPI_STATE_S5);
acpi_enter_sleep_state(ACPI_STATE_S5);
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index c7e128e..7361204 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void)
* RETURN: Updated pointer to the function name
*
* DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
- * This allows compiler macros such as __FUNCTION__ to be used
+ * This allows compiler macros such as __func__ to be used
* with no change to the debug output.
*
******************************************************************************/
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 12cce69..d64a142 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
if (!video)
goto end;
- printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__);
+ printk(KERN_INFO PREFIX "Please implement %s\n", __func__);
seq_printf(seq, "<TODO>\n");
end:
--
1.5.4.3.422.g34cd6
^ permalink raw reply related [flat|nested] 17+ messages in thread