[PATCH] don't add input capabilities to tablet PNP device

Matthew Garrett mjg59 at srcf.ucam.org
Mon Feb 16 08:29:12 PST 2009


If hal detects that a PNP device is associated with a tablet PC it adds 
the input capability to that device. This is wrong - the input device is 
the serial device whose parent is this PNP device. Adding the input 
capability just results in X attempting to add the PNP device as an 
input device, despite it not being one and having no associated driver.

FDI files for the appropriate driver can add the capabilities to the 
serial port device, so there's no need to have the core add these 
misleading ones. Simply remove them.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 21b9176..f540cb7 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -2130,10 +2130,6 @@ pnp_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
 		if( !strncmp(pnp_id, "WACf00", 6) || !strcmp(pnp_id, "FUJ02e5") ||
 		    !strcmp(pnp_id, "FUJ02e6") || !strcmp(pnp_id, "FPI2004")) {
 			/* a internal serial tablet --> this should be a tablet pc */
-			hal_device_add_capability (d, "input");
-			hal_device_add_capability (d, "input.tablet");
-			hal_device_add_capability (d, "input.tablet.tabletPC");
-
 			if ((computer = hal_device_store_find (hald_get_gdl (), "/org/freedesktop/Hal/devices/computer")) != NULL ||
 			    (computer = hal_device_store_find (hald_get_tdl (), "/org/freedesktop/Hal/devices/computer")) != NULL) {
 
-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the hal mailing list