Source
63
63
},
64
64
.owner = THIS_MODULE,
65
65
};
66
66
67
67
static acpi_status
68
68
pvpanic_walk_resources(struct acpi_resource *res, void *context)
69
69
{
70
70
struct resource r;
71
71
72
72
if (acpi_dev_resource_io(res, &r)) {
73
+
#ifdef CONFIG_HAS_IOPORT_MAP
73
74
base = ioport_map(r.start, resource_size(&r));
74
75
return AE_OK;
76
+
#else
77
+
return AE_ERROR;
78
+
#endif
75
79
} else if (acpi_dev_resource_memory(res, &r)) {
76
80
base = ioremap(r.start, resource_size(&r));
77
81
return AE_OK;
78
82
}
79
83
80
84
return AE_ERROR;
81
85
}
82
86
83
87
static int pvpanic_add(struct acpi_device *device)
84
88
{