uhid: backport from 3.4

Change-Id: Ic48f83f4ed405048ff1e08c04768ed0baefe1caf