~ubuntu-branches/ubuntu/lucid/hal/lucid

« back to all changes in this revision

Viewing changes to hald/linux/device.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-06-26 10:04:33 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090626100433-nd42rcjbmg5261tx
Tags: 0.5.12+git20090626-0ubuntu1
* New upstream git snapshot:
  - Add input.keys capability to power/hibernate/etc. keys. (LP: #384890)
* Drop 01_tablet_evdev.patch, 50_no_crash_on_md_blockdev.patch: Applied
  upstream.
* 04_nvidia_brightness.patch: Update to new upstream version.
* debian/control: Change back Vcs-Bzr:, Ubuntu package are only for full
  source trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1006
1006
                } else if (test_bit (KEY_SUSPEND, bitmask)) {
1007
1007
                        hal_device_property_set_string (d, "button.type", "hibernate");
1008
1008
                }
 
1009
                if (input_test_keys (bitmask))
 
1010
                        hal_device_add_capability (d, "input.keys");
1009
1011
        } else {
1010
1012
                gboolean is_keyboard = input_test_keyboard (bitmask);
1011
1013
                gboolean is_keypad = input_test_keypad (bitmask);
3496
3498
                hald_compute_udi (udi, sizeof (udi),
3497
3499
                                  "%s_sound_card_%i",
3498
3500
                                  hal_device_property_get_string (d, "info.parent"),
3499
 
                                  hal_device_property_get_string (d, "sound.card"));
 
3501
                                  hal_device_property_get_int (d, "sound.card"));
3500
3502
        } else if (hal_device_has_property(d, "alsa.card")) {
3501
3503
                /* don't include card number as it may not be persistent across reboots */
3502
3504
                hald_compute_udi (udi, sizeof (udi),
4829
4831
                handler = dev_handlers[i];
4830
4832
                if (strcmp (handler->subsystem, subsystem) == 0) {
4831
4833
                        HalDevice *d;
 
4834
                        HalDevice *check;
4832
4835
 
4833
4836
                        if (strcmp (subsystem, "scsi") == 0)
4834
4837
                                if (missing_scsi_host (sysfs_path, (HotplugEvent *)end_token, HOTPLUG_ACTION_ADD))
4835
4838
                                        goto out;
4836
4839
 
 
4840
                        /* check if there is already a device with this sysfs_path in the system */
 
4841
                        if ((check = hal_device_store_match_key_value_string (hald_get_gdl (), "linux.sysfs_path", sysfs_path)) != NULL ||
 
4842
                            (check = hal_device_store_match_key_value_string (hald_get_tdl (), "linux.sysfs_path", sysfs_path)) != NULL) {
 
4843
                                HAL_WARNING(("Have already a device with sysfs_path='%s' and udi='%s'. Ignore new add event for now.", 
 
4844
                                             sysfs_path, hal_device_get_udi(check)));
 
4845
                                /* maybe we should do a refresh on the found device ??? */
 
4846
                                hotplug_event_end (end_token);
 
4847
                                goto out; 
 
4848
                        }
 
4849
 
4837
4850
                        /* attempt to add the device */
4838
4851
                        d = handler->add (sysfs_path, device_file, parent_dev, parent_path);
4839
4852
                        if (d == NULL) {