@@ -243,13 +243,16 @@ static int acpi_scan_try_to_offline(struct acpi_device *device)
243
243
return 0 ;
244
244
}
245
245
246
- static int acpi_scan_check_and_detach (struct acpi_device * adev , void * check )
246
+ #define ACPI_SCAN_CHECK_FLAG_STATUS BIT(0)
247
+
248
+ static int acpi_scan_check_and_detach (struct acpi_device * adev , void * p )
247
249
{
248
250
struct acpi_scan_handler * handler = adev -> handler ;
251
+ uintptr_t flags = (uintptr_t )p ;
249
252
250
- acpi_dev_for_each_child_reverse (adev , acpi_scan_check_and_detach , check );
253
+ acpi_dev_for_each_child_reverse (adev , acpi_scan_check_and_detach , p );
251
254
252
- if (check ) {
255
+ if (flags & ACPI_SCAN_CHECK_FLAG_STATUS ) {
253
256
acpi_bus_get_status (adev );
254
257
/*
255
258
* Skip devices that are still there and take the enabled
@@ -287,7 +290,9 @@ static int acpi_scan_check_and_detach(struct acpi_device *adev, void *check)
287
290
288
291
static void acpi_scan_check_subtree (struct acpi_device * adev )
289
292
{
290
- acpi_scan_check_and_detach (adev , (void * )true);
293
+ uintptr_t flags = ACPI_SCAN_CHECK_FLAG_STATUS ;
294
+
295
+ acpi_scan_check_and_detach (adev , (void * )flags );
291
296
}
292
297
293
298
static int acpi_scan_hot_remove (struct acpi_device * device )
@@ -2596,7 +2601,9 @@ EXPORT_SYMBOL(acpi_bus_scan);
2596
2601
*/
2597
2602
void acpi_bus_trim (struct acpi_device * adev )
2598
2603
{
2599
- acpi_scan_check_and_detach (adev , NULL );
2604
+ uintptr_t flags = 0 ;
2605
+
2606
+ acpi_scan_check_and_detach (adev , (void * )flags );
2600
2607
}
2601
2608
EXPORT_SYMBOL_GPL (acpi_bus_trim );
2602
2609
0 commit comments