Merge branches 'acpi-fan', 'acpi-video' and 'acpi-ec'
* acpi-fan: ACPI / Fan: Use bus id as the name for non PNP0C0B (Fan) devices * acpi-video: ACPI / video: update the skip case for acpi_video_device_in_dod() * acpi-ec: ACPI / EC: Fix unexpected ec_remove_handlers() invocations
This commit is contained in:
commit
0a06664286
|
@ -844,6 +844,8 @@ static int ec_install_handlers(struct acpi_ec *ec)
|
||||||
|
|
||||||
static void ec_remove_handlers(struct acpi_ec *ec)
|
static void ec_remove_handlers(struct acpi_ec *ec)
|
||||||
{
|
{
|
||||||
|
if (!test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
|
||||||
|
return;
|
||||||
acpi_disable_gpe(NULL, ec->gpe);
|
acpi_disable_gpe(NULL, ec->gpe);
|
||||||
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
|
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
|
||||||
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
|
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
|
||||||
|
|
|
@ -325,6 +325,7 @@ static int acpi_fan_probe(struct platform_device *pdev)
|
||||||
struct thermal_cooling_device *cdev;
|
struct thermal_cooling_device *cdev;
|
||||||
struct acpi_fan *fan;
|
struct acpi_fan *fan;
|
||||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||||
|
char *name;
|
||||||
|
|
||||||
fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL);
|
fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL);
|
||||||
if (!fan) {
|
if (!fan) {
|
||||||
|
@ -346,7 +347,12 @@ static int acpi_fan_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cdev = thermal_cooling_device_register("Fan", device,
|
if (!strncmp(pdev->name, "PNP0C0B", strlen("PNP0C0B")))
|
||||||
|
name = "Fan";
|
||||||
|
else
|
||||||
|
name = acpi_device_bid(device);
|
||||||
|
|
||||||
|
cdev = thermal_cooling_device_register(name, device,
|
||||||
&fan_cooling_ops);
|
&fan_cooling_ops);
|
||||||
if (IS_ERR(cdev)) {
|
if (IS_ERR(cdev)) {
|
||||||
result = PTR_ERR(cdev);
|
result = PTR_ERR(cdev);
|
||||||
|
|
|
@ -155,6 +155,7 @@ struct acpi_video_bus {
|
||||||
u8 dos_setting;
|
u8 dos_setting;
|
||||||
struct acpi_video_enumerated_device *attached_array;
|
struct acpi_video_enumerated_device *attached_array;
|
||||||
u8 attached_count;
|
u8 attached_count;
|
||||||
|
u8 child_count;
|
||||||
struct acpi_video_bus_cap cap;
|
struct acpi_video_bus_cap cap;
|
||||||
struct acpi_video_bus_flags flags;
|
struct acpi_video_bus_flags flags;
|
||||||
struct list_head video_device_list;
|
struct list_head video_device_list;
|
||||||
|
@ -1159,8 +1160,12 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
|
||||||
struct acpi_video_bus *video = device->video;
|
struct acpi_video_bus *video = device->video;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* If we have a broken _DOD, no need to test */
|
/*
|
||||||
if (!video->attached_count)
|
* If we have a broken _DOD or we have more than 8 output devices
|
||||||
|
* under the graphics controller node that we can't proper deal with
|
||||||
|
* in the operation region code currently, no need to test.
|
||||||
|
*/
|
||||||
|
if (!video->attached_count || video->child_count > 8)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
for (i = 0; i < video->attached_count; i++) {
|
for (i = 0; i < video->attached_count; i++) {
|
||||||
|
@ -1413,6 +1418,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
|
||||||
dev_err(&dev->dev, "Can't attach device\n");
|
dev_err(&dev->dev, "Can't attach device\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
video->child_count++;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue