aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/aiptek.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-21 00:17:12 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-07-10 00:35:15 -0400
commit9b40ed088bb14ebed30540b19d5c417dc4d9d528 (patch)
tree653f2254e6bdcd43765ea17460d8a5d63ca57434 /drivers/input/tablet/aiptek.c
parentaea6a46122a0ce65a831fd93cac6d2084ac666f9 (diff)
Input: aiptek - do not try to export associated event device
Do not try to export via sysfs associated event device - it does not work when evdev is a module that is loaded after aiptek; also it pokes too deply into input core internals. Userspace should rely on udev to set up permanent device name for the tablet. Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r--drivers/input/tablet/aiptek.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index cc0a498763d8..c4df4f727f1f 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -294,7 +294,6 @@ struct aiptek_features {
294 int modelCode; /* Tablet model code (not unique) */ 294 int modelCode; /* Tablet model code (not unique) */
295 int firmwareCode; /* prom/eeprom version */ 295 int firmwareCode; /* prom/eeprom version */
296 char usbPath[64 + 1]; /* device's physical usb path */ 296 char usbPath[64 + 1]; /* device's physical usb path */
297 char inputPath[64 + 1]; /* input device path */
298}; 297};
299 298
300struct aiptek_settings { 299struct aiptek_settings {
@@ -1415,23 +1414,6 @@ static DEVICE_ATTR(delay,
1415 show_tabletProgrammableDelay, store_tabletProgrammableDelay); 1414 show_tabletProgrammableDelay, store_tabletProgrammableDelay);
1416 1415
1417/*********************************************************************** 1416/***********************************************************************
1418 * support routines for the 'input_path' file. Note that this file
1419 * only displays current setting.
1420 */
1421static ssize_t show_tabletInputDevice(struct device *dev, struct device_attribute *attr, char *buf)
1422{
1423 struct aiptek *aiptek = dev_get_drvdata(dev);
1424
1425 if (aiptek == NULL)
1426 return 0;
1427
1428 return snprintf(buf, PAGE_SIZE, "/dev/input/%s\n",
1429 aiptek->features.inputPath);
1430}
1431
1432static DEVICE_ATTR(input_path, S_IRUGO, show_tabletInputDevice, NULL);
1433
1434/***********************************************************************
1435 * support routines for the 'event_count' file. Note that this file 1417 * support routines for the 'event_count' file. Note that this file
1436 * only displays current setting. 1418 * only displays current setting.
1437 */ 1419 */
@@ -1896,7 +1878,6 @@ static void aiptek_delete_files(struct device *dev)
1896 device_remove_file(dev, &dev_attr_ytilt); 1878 device_remove_file(dev, &dev_attr_ytilt);
1897 device_remove_file(dev, &dev_attr_jitter); 1879 device_remove_file(dev, &dev_attr_jitter);
1898 device_remove_file(dev, &dev_attr_delay); 1880 device_remove_file(dev, &dev_attr_delay);
1899 device_remove_file(dev, &dev_attr_input_path);
1900 device_remove_file(dev, &dev_attr_event_count); 1881 device_remove_file(dev, &dev_attr_event_count);
1901 device_remove_file(dev, &dev_attr_diagnostic); 1882 device_remove_file(dev, &dev_attr_diagnostic);
1902 device_remove_file(dev, &dev_attr_odm_code); 1883 device_remove_file(dev, &dev_attr_odm_code);
@@ -1931,7 +1912,6 @@ static int aiptek_add_files(struct device *dev)
1931 (ret = device_create_file(dev, &dev_attr_ytilt)) || 1912 (ret = device_create_file(dev, &dev_attr_ytilt)) ||
1932 (ret = device_create_file(dev, &dev_attr_jitter)) || 1913 (ret = device_create_file(dev, &dev_attr_jitter)) ||
1933 (ret = device_create_file(dev, &dev_attr_delay)) || 1914 (ret = device_create_file(dev, &dev_attr_delay)) ||
1934 (ret = device_create_file(dev, &dev_attr_input_path)) ||
1935 (ret = device_create_file(dev, &dev_attr_event_count)) || 1915 (ret = device_create_file(dev, &dev_attr_event_count)) ||
1936 (ret = device_create_file(dev, &dev_attr_diagnostic)) || 1916 (ret = device_create_file(dev, &dev_attr_diagnostic)) ||
1937 (ret = device_create_file(dev, &dev_attr_odm_code)) || 1917 (ret = device_create_file(dev, &dev_attr_odm_code)) ||
@@ -1961,8 +1941,6 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1961 struct usb_endpoint_descriptor *endpoint; 1941 struct usb_endpoint_descriptor *endpoint;
1962 struct aiptek *aiptek; 1942 struct aiptek *aiptek;
1963 struct input_dev *inputdev; 1943 struct input_dev *inputdev;
1964 struct input_handle *inputhandle;
1965 struct list_head *node, *next;
1966 int i; 1944 int i;
1967 int speeds[] = { 0, 1945 int speeds[] = { 0,
1968 AIPTEK_PROGRAMMABLE_DELAY_50, 1946 AIPTEK_PROGRAMMABLE_DELAY_50,
@@ -2140,21 +2118,6 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
2140 if (err) 2118 if (err)
2141 goto fail2; 2119 goto fail2;
2142 2120
2143 /* We now will look for the evdev device which is mapped to
2144 * the tablet. The partial name is kept in the link list of
2145 * input_handles associated with this input device.
2146 * What identifies an evdev input_handler is that it begins
2147 * with 'event', continues with a digit, and that in turn
2148 * is mapped to input/eventN.
2149 */
2150 list_for_each_safe(node, next, &inputdev->h_list) {
2151 inputhandle = to_handle(node);
2152 if (strncmp(inputhandle->name, "event", 5) == 0) {
2153 strcpy(aiptek->features.inputPath, inputhandle->name);
2154 break;
2155 }
2156 }
2157
2158 /* Associate this driver's struct with the usb interface. 2121 /* Associate this driver's struct with the usb interface.
2159 */ 2122 */
2160 usb_set_intfdata(intf, aiptek); 2123 usb_set_intfdata(intf, aiptek);
@@ -2163,11 +2126,6 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
2163 */ 2126 */
2164 aiptek_add_files(&intf->dev); 2127 aiptek_add_files(&intf->dev);
2165 2128
2166 /* Make sure the evdev module is loaded. Assuming evdev IS a module :-)
2167 */
2168 if (request_module("evdev") != 0)
2169 info("aiptek: error loading 'evdev' module");
2170
2171 return 0; 2129 return 0;
2172 2130
2173 fail2: usb_buffer_free(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data, 2131 fail2: usb_buffer_free(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data,