/* Scale a signed value in range -0x8000..0x7fff for the given field  */
static int pidff_rescale_signed(int i, struct hid_field *field)
/* Scale a signed value in range -0x8000..0x7fff for the given field  */
static int pidff_rescale_signed(int i, struct hid_field *field)
{
	return i == 0 ? 0 : i >
	    0 ? i * field->logical_maximum / 0x7fff : i *
	    field->logical_minimum / -0x8000;
}