summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-08-30 14:11:07 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-09-10 12:56:01 +0200
commitd030fd0ec5c782e6813a7d684029758041ba3b46 (patch)
tree0296d09f2c0512d5e76a0fcf4f99d24967754718 /drivers/acpi
parent11da3a7f84f19c26da6f86af878298694ede0804 (diff)
ACPI / property: Switch to bitmap_zalloc()
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/x86/apple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/x86/apple.c b/drivers/acpi/x86/apple.c
index 51b4cf9f25da..bb1984f6c9fe 100644
--- a/drivers/acpi/x86/apple.c
+++ b/drivers/acpi/x86/apple.c
@@ -62,7 +62,7 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
if (!numprops)
goto out_free;
- valid = kcalloc(BITS_TO_LONGS(numprops), sizeof(long), GFP_KERNEL);
+ valid = bitmap_zalloc(numprops, GFP_KERNEL);
if (!valid)
goto out_free;
@@ -137,5 +137,5 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
out_free:
ACPI_FREE(props);
- kfree(valid);
+ bitmap_free(valid);
}