Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2ae1717 authored by Peng Hao's avatar Peng Hao Committed by Greg Kroah-Hartman
Browse files

misc/pvpanic: simplify the code using acpi_dev_resource_io

parent fcb418cd
Loading
Loading
Loading
Loading
+5 −8
Original line number Original line Diff line number Diff line
@@ -77,18 +77,15 @@ static struct notifier_block pvpanic_panic_nb = {
static acpi_status
static acpi_status
pvpanic_walk_resources(struct acpi_resource *res, void *context)
pvpanic_walk_resources(struct acpi_resource *res, void *context)
{
{
	switch (res->type) {
	struct resource r;
	case ACPI_RESOURCE_TYPE_END_TAG:
		return AE_OK;


	case ACPI_RESOURCE_TYPE_IO:
	if (acpi_dev_resource_io(res, &r)) {
		port = res->data.io.minimum;
		port = r.start;
		return AE_OK;
		return AE_OK;
	}


	default:
	return AE_ERROR;
	return AE_ERROR;
}
}
}


static int pvpanic_add(struct acpi_device *device)
static int pvpanic_add(struct acpi_device *device)
{
{