[hid:for-4.20/multitouch 1/1] drivers/hid/hid-multitouch.c:1327:5: error: 'struct hid_input' has no member named 'application'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-4.20/multitouch
head:   93c61d2e6bc4849a5527e32568479ff67154870e
commit: 93c61d2e6bc4849a5527e32568479ff67154870e [1/1] HID: multitouch: simplify the application retrieval
config: x86_64-randconfig-x018-201835 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 93c61d2e6bc4849a5527e32568479ff67154870e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/hid/hid-multitouch.c: In function 'mt_input_mapping':
>> drivers/hid/hid-multitouch.c:1327:5: error: 'struct hid_input' has no member named 'application'
      hi->application = HID_DG_STYLUS;
        ^~
   drivers/hid/hid-multitouch.c: In function 'mt_input_configured':
   drivers/hid/hid-multitouch.c:1527:12: error: 'struct hid_input' has no member named 'application'
     switch (hi->application) {
               ^~

vim +1327 drivers/hid/hid-multitouch.c

  1257	
  1258	#define mt_map_key_clear(c)	hid_map_usage_clear(hi, usage, bit, \
  1259							    max, EV_KEY, (c))
  1260	static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
  1261			struct hid_field *field, struct hid_usage *usage,
  1262			unsigned long **bit, int *max)
  1263	{
  1264		struct mt_device *td = hid_get_drvdata(hdev);
  1265		struct mt_application *application;
  1266		struct mt_report_data *rdata;
  1267	
  1268		rdata = mt_find_report_data(td, field->report);
  1269		if (!rdata) {
  1270			hid_err(hdev, "failed to allocate data for report\n");
  1271			return 0;
  1272		}
  1273	
  1274		application = rdata->application;
  1275	
  1276		/*
  1277		 * If mtclass.export_all_inputs is not set, only map fields from
  1278		 * TouchScreen or TouchPad collections. We need to ignore fields
  1279		 * that belong to other collections such as Mouse that might have
  1280		 * the same GenericDesktop usages.
  1281		 */
  1282		if (!td->mtclass.export_all_inputs &&
  1283		    field->application != HID_DG_TOUCHSCREEN &&
  1284		    field->application != HID_DG_PEN &&
  1285		    field->application != HID_DG_TOUCHPAD &&
  1286		    field->application != HID_GD_KEYBOARD &&
  1287		    field->application != HID_GD_SYSTEM_CONTROL &&
  1288		    field->application != HID_CP_CONSUMER_CONTROL &&
  1289		    field->application != HID_GD_WIRELESS_RADIO_CTLS &&
  1290		    field->application != HID_GD_SYSTEM_MULTIAXIS &&
  1291		    !(field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS &&
  1292		      application->quirks & MT_QUIRK_ASUS_CUSTOM_UP))
  1293			return -1;
  1294	
  1295		/*
  1296		 * Some Asus keyboard+touchpad devices have the hotkeys defined in the
  1297		 * touchpad report descriptor. We need to treat these as an array to
  1298		 * map usages to input keys.
  1299		 */
  1300		if (field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS &&
  1301		    application->quirks & MT_QUIRK_ASUS_CUSTOM_UP &&
  1302		    (usage->hid & HID_USAGE_PAGE) == HID_UP_CUSTOM) {
  1303			set_bit(EV_REP, hi->input->evbit);
  1304			if (field->flags & HID_MAIN_ITEM_VARIABLE)
  1305				field->flags &= ~HID_MAIN_ITEM_VARIABLE;
  1306			switch (usage->hid & HID_USAGE) {
  1307			case 0x10: mt_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
  1308			case 0x20: mt_map_key_clear(KEY_BRIGHTNESSUP);		break;
  1309			case 0x35: mt_map_key_clear(KEY_DISPLAY_OFF);		break;
  1310			case 0x6b: mt_map_key_clear(KEY_F21);			break;
  1311			case 0x6c: mt_map_key_clear(KEY_SLEEP);			break;
  1312			default:
  1313				return -1;
  1314			}
  1315			return 1;
  1316		}
  1317	
  1318		if (rdata->is_mt_collection)
  1319			return mt_touch_input_mapping(hdev, hi, field, usage, bit, max,
  1320						      application);
  1321	
  1322		/*
  1323		 * some egalax touchscreens have "application == DG_TOUCHSCREEN"
  1324		 * for the stylus. Overwrite the hid_input application
  1325		 */
  1326		if (field->physical == HID_DG_STYLUS)
> 1327			hi->application = HID_DG_STYLUS;
  1328	
  1329		/* let hid-core decide for the others */
  1330		return 0;
  1331	}
  1332	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux