ACPI: EC: Fix debugfs_create_*() usage
acpi_ec.gpe is "unsigned long", hence treating it as "u32" would expose
the wrong half on big-endian 64-bit systems. Fix this by changing its
type to "u32" and removing the cast, as all other code already uses u32
or sometimes even only u8.
Fixes: 1195a09816
(ACPI: Provide /sys/kernel/debug/ec/...)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
30a7acd573
commit
3522f867c1
@@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe))
|
||||
if (!debugfs_create_x32("gpe", 0444, dev_dir, &first_ec->gpe))
|
||||
goto error;
|
||||
if (!debugfs_create_bool("use_global_lock", 0444, dev_dir,
|
||||
&first_ec->global_lock))
|
||||
|
Reference in New Issue
Block a user