Summary: | Bluetooth HID keyboard battery shows up as laptop battery | ||
---|---|---|---|
Product: | upower | Reporter: | Sean Cross <xobs> |
Component: | general | Assignee: | Richard Hughes <richard> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, xobs |
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | A patch to add support for detecting hid devices, in addition to bluetooth devices |
Description
Sean Cross
2014-11-21 05:43:55 UTC
Comment on attachment 109792 [details] [review] A patch to add support for detecting hid devices, in addition to bluetooth devices Review of attachment 109792 [details] [review]: ----------------------------------------------------------------- I'm guessing that the patch is in whatever format is used for debian changelogs. Please submit one that's been git-formatted ("git format-patch -1 ..."). ::: upower-0.99.1.orig/src/linux/up-device-supply.c @@ +990,5 @@ > type = UP_DEVICE_KIND_LINE_POWER; > } else if (g_ascii_strcasecmp (device_type, "battery") == 0) { > > + int i; > + const char *classes[] = {"hid", "bluetooth"}; Space, after the opening bracket and before the closing one. @@ +991,5 @@ > } else if (g_ascii_strcasecmp (device_type, "battery") == 0) { > > + int i; > + const char *classes[] = {"hid", "bluetooth"}; > + int num_classes = sizeof(classes) / sizeof(*classes); Use G_N_ELEMENTS() directly. @@ +994,5 @@ > + const char *classes[] = {"hid", "bluetooth"}; > + int num_classes = sizeof(classes) / sizeof(*classes); > + > + for (i = 0; i < num_classes && type == UP_DEVICE_KIND_UNKNOWN; i++) { > + No need for that stray linefeed. @@ +997,5 @@ > + for (i = 0; i < num_classes && type == UP_DEVICE_KIND_UNKNOWN; i++) { > + > + input_path = up_device_get_input_path (native, classes[i]); > + > + if (input_path != NULL) { It would be more readable with: if (input_path == NULL) continue; |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.