mirror of https://gitee.com/openkylin/linux.git
ACPI: EC: fix compilation warning
Fix the warning introduced in commit c5279dee26
,
and give the dummy variable a more verbose name.
drivers/acpi/ec.c: In function 'acpi_ec_ecdt_probe':
drivers/acpi/ec.c:1015: warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
c5279dee26
commit
3e54048691
|
@ -979,6 +979,7 @@ int __init acpi_ec_ecdt_probe(void)
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
struct acpi_table_ecdt *ecdt_ptr;
|
struct acpi_table_ecdt *ecdt_ptr;
|
||||||
|
acpi_handle dummy;
|
||||||
|
|
||||||
boot_ec = make_acpi_ec();
|
boot_ec = make_acpi_ec();
|
||||||
if (!boot_ec)
|
if (!boot_ec)
|
||||||
|
@ -1011,7 +1012,6 @@ int __init acpi_ec_ecdt_probe(void)
|
||||||
}
|
}
|
||||||
/* This workaround is needed only on some broken machines,
|
/* This workaround is needed only on some broken machines,
|
||||||
* which require early EC, but fail to provide ECDT */
|
* which require early EC, but fail to provide ECDT */
|
||||||
acpi_handle x;
|
|
||||||
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
|
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
|
||||||
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
|
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
|
||||||
boot_ec, NULL);
|
boot_ec, NULL);
|
||||||
|
@ -1022,7 +1022,7 @@ int __init acpi_ec_ecdt_probe(void)
|
||||||
* which needs it, has fake EC._INI method, so use it as flag.
|
* which needs it, has fake EC._INI method, so use it as flag.
|
||||||
* Keep boot_ec struct as it will be needed soon.
|
* Keep boot_ec struct as it will be needed soon.
|
||||||
*/
|
*/
|
||||||
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
|
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &dummy)))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
install:
|
install:
|
||||||
if (!ec_install_handlers(boot_ec)) {
|
if (!ec_install_handlers(boot_ec)) {
|
||||||
|
|
Loading…
Reference in New Issue