Lines 2195-2205
static int acpi_video_resume(struct acpi
Link Here
|
2195 |
return AE_OK; |
2195 |
return AE_OK; |
2196 |
} |
2196 |
} |
2197 |
|
2197 |
|
|
|
2198 |
static acpi_status |
2199 |
acpi_video_bus_match(acpi_handle handle, u32 level, void *context, |
2200 |
void **return_value) |
2201 |
{ |
2202 |
struct acpi_device *device = context; |
2203 |
struct acpi_device *sibling; |
2204 |
int result; |
2205 |
|
2206 |
if (handle == device->handle) |
2207 |
return AE_CTRL_TERMINATE; |
2208 |
|
2209 |
result = acpi_bus_get_device(handle, &sibling); |
2210 |
if (result) |
2211 |
return AE_OK; |
2212 |
|
2213 |
/* only one ACPI bus video device under a PCI device */ |
2214 |
if (!strcmp(acpi_device_name(sibling), ACPI_VIDEO_BUS_NAME)) |
2215 |
return AE_ALREADY_EXISTS; |
2216 |
|
2217 |
return AE_OK; |
2218 |
} |
2219 |
|
2198 |
static int acpi_video_bus_add(struct acpi_device *device) |
2220 |
static int acpi_video_bus_add(struct acpi_device *device) |
2199 |
{ |
2221 |
{ |
2200 |
struct acpi_video_bus *video; |
2222 |
struct acpi_video_bus *video; |
2201 |
struct input_dev *input; |
2223 |
struct input_dev *input; |
2202 |
int error; |
2224 |
int error; |
|
|
2225 |
acpi_status status; |
2226 |
|
2227 |
status = acpi_walk_namespace(ACPI_TYPE_DEVICE, |
2228 |
device->parent->handle, 1, |
2229 |
acpi_video_bus_match, device, NULL); |
2230 |
if (status == AE_ALREADY_EXISTS) { |
2231 |
printk(KERN_WARNING PREFIX, "Duplicate ACPI video bus " |
2232 |
"devices for the same VGA controller\n"); |
2233 |
return -ENODEV; |
2234 |
} |
2203 |
|
2235 |
|
2204 |
video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); |
2236 |
video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); |
2205 |
if (!video) |
2237 |
if (!video) |