hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/acpi/x86/apple.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * apple.c - Apple ACPI quirks
34 * Copyright (C) 2017 Lukas Wunner <lukas@wunner.de>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License (version 2) as
7
- * published by the Free Software Foundation.
85 */
96
107 #include <linux/acpi.h>
....@@ -62,7 +59,7 @@
6259 if (!numprops)
6360 goto out_free;
6461
65
- valid = kcalloc(BITS_TO_LONGS(numprops), sizeof(long), GFP_KERNEL);
62
+ valid = bitmap_zalloc(numprops, GFP_KERNEL);
6663 if (!valid)
6764 goto out_free;
6865
....@@ -132,10 +129,10 @@
132129 }
133130 WARN_ON(free_space != (void *)newprops + newsize);
134131
135
- adev->data.properties = newprops;
136132 adev->data.pointer = newprops;
133
+ acpi_data_add_props(&adev->data, &apple_prp_guid, newprops);
137134
138135 out_free:
139136 ACPI_FREE(props);
140
- kfree(valid);
137
+ bitmap_free(valid);
141138 }