diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 313f959..edc970d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -917,8 +917,10 @@ static int acpi_video_bus_check(struct acpi_video_bus *video) return -EINVAL; dev = acpi_get_pci_dev(video->device->handle); - if (!dev) + if (!dev) { + dev_info(&video->device->dev, "%s: 2\n", __func__); return -ENODEV; + } pci_dev_put(dev); /* Since there is no HID, CID and so on for VGA driver, we have @@ -1374,7 +1376,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, status = acpi_video_bus_get_one_device(dev, video); if (status) { printk(KERN_WARNING PREFIX - "Can't attach device\n"); + "%s: Can't attach device, status=0x%x\n", __func__, status); continue; } } @@ -1643,10 +1645,13 @@ static int acpi_video_bus_add(struct acpi_device *device) if (!allow_duplicates) return -ENODEV; } + dev_info(&device->dev, "%s: status=0x%x\n", __func__, status); video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); - if (!video) + if (!video) { + dev_info(&device->dev, "%s: 1\n", __func__); return -ENOMEM; + } /* a hack to fix the duplicate name "VID" problem on T61 */ if (!strcmp(device->pnp.bus_id, "VID")) { @@ -1668,25 +1673,32 @@ static int acpi_video_bus_add(struct acpi_device *device) acpi_video_bus_find_cap(video); error = acpi_video_bus_check(video); - if (error) + if (error) { + dev_info(&device->dev, "%s: 3, err=0x%x\n", __func__, error); goto err_free_video; + } mutex_init(&video->device_list_lock); INIT_LIST_HEAD(&video->video_device_list); error = acpi_video_bus_get_devices(video, device); - if (error) + if (error) { + dev_info(&device->dev, "%s: 4, err=0x%x\n", __func__, error); goto err_free_video; + } video->input = input = input_allocate_device(); if (!input) { + dev_info(&device->dev, "%s: 5\n", __func__); error = -ENOMEM; goto err_put_video; } error = acpi_video_bus_start_devices(video); - if (error) + if (error) { + dev_info(&device->dev, "%s: 6, err=0x%x\n", __func__, error); goto err_free_input_dev; + } snprintf(video->phys, sizeof(video->phys), "%s/video/input0", acpi_device_hid(video->device)); @@ -1715,12 +1727,16 @@ static int acpi_video_bus_add(struct acpi_device *device) video->pm_nb.notifier_call = acpi_video_resume; video->pm_nb.priority = 0; error = register_pm_notifier(&video->pm_nb); - if (error) + if (error) { + dev_info(&device->dev, "%s: 7, err=0x%x\n", __func__, error); goto err_stop_video; + } error = input_register_device(input); - if (error) + if (error) { + dev_info(&device->dev, "%s: 8, err=0x%x\n", __func__, error); goto err_unregister_pm_notifier; + } return 0; @@ -1797,6 +1813,7 @@ int acpi_video_register(void) { int result = 0; if (register_count) { + pr_info("%s: already registered\n", __func__); /* * if the function of acpi_video_register is already called, * don't register the acpi_vide_bus again and return no error.