View | Details | Raw Unified | Return to bug 257992 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/dev/hid/hmt.c (-6 / +6 lines)
Lines 343-356 hmt_attach(device_t dev) Link Here
343
		bzero(fbuf, fsize);
343
		bzero(fbuf, fsize);
344
		err = hid_get_report(dev, fbuf, sc->btn_type_rlen, NULL,
344
		err = hid_get_report(dev, fbuf, sc->btn_type_rlen, NULL,
345
		    HID_FEATURE_REPORT, sc->btn_type_rid);
345
		    HID_FEATURE_REPORT, sc->btn_type_rid);
346
	}
346
		if (err != 0)
347
	if (sc->btn_type_rlen > 1) {
348
		if (err == 0)
349
			sc->is_clickpad = hid_get_udata(fbuf + 1,
350
			    sc->btn_type_rlen - 1, &sc->btn_type_loc) == 0;
351
		else
352
			DPRINTF("hid_get_report error=%d\n", err);
347
			DPRINTF("hid_get_report error=%d\n", err);
353
	}
348
	}
349
	if (sc->btn_type_rlen > 1 && err == 0)
350
		sc->is_clickpad = hid_get_udata(fbuf + 1, sc->btn_type_rlen - 1,
351
		    &sc->btn_type_loc) == 0;
352
	else
353
		sc->is_clickpad = sc->max_button == 0 && sc->has_int_button;
354
354
355
	/* Fetch THQA certificate to enable some devices like WaveShare */
355
	/* Fetch THQA certificate to enable some devices like WaveShare */
356
	if (sc->thqa_cert_rlen > 1 && sc->thqa_cert_rid != sc->cont_max_rid)
356
	if (sc->thqa_cert_rlen > 1 && sc->thqa_cert_rid != sc->cont_max_rid)

Return to bug 257992