Commit d264dd3b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-2022122101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID updates from Benjamin Tissoires:

 - Four potential NULL pointers dereferences (Bastien Nocera, Enrik
   Berkhan, Jiasheng Jiang and Roderick Colenbrander)

 - Allow Wacom devices in bootloader mode to be flashed (Jason Gerecke)

 - Some assorted devices quirks (José Expósito and Terry Junge)

* tag 'for-linus-2022122101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: sony: Fix unused function warning
  HID: plantronics: Additional PIDs for double volume key presses quirk
  HID: multitouch: fix Asus ExpertBook P2 P2451FA trackpoint
  HID: Ignore HP Envy x360 eu0009nv stylus battery
  HID: wacom: Ensure bootloader PID is usable in hidraw mode
  HID: amd_sfh: Add missing check for dma_alloc_coherent
  HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth.
  HID: mcp2221: don't connect hidraw
  HID: logitech-hidpp: Guard FF init code against non-USB devices
parents 5461e079 54f27dc5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -897,7 +897,7 @@ config HID_PLAYSTATION
	select CRC32
	select POWER_SUPPLY
	help
	  Provides support for Sony PS5 controllers including support for
	  Provides support for Sony PS4/PS5 controllers including support for
	  its special functionalities e.g. touchpad, lights and motion
	  sensors.

+4 −0
Original line number Diff line number Diff line
@@ -237,6 +237,10 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
		in_data->sensor_virt_addr[i] = dma_alloc_coherent(dev, sizeof(int) * 8,
								  &cl_data->sensor_dma_addr[i],
								  GFP_KERNEL);
		if (!in_data->sensor_virt_addr[i]) {
			rc = -ENOMEM;
			goto cleanup;
		}
		cl_data->sensor_sts[i] = SENSOR_DISABLED;
		cl_data->sensor_requested_cnt[i] = 0;
		cl_data->cur_hid_dev = i;
+4 −0
Original line number Diff line number Diff line
@@ -412,6 +412,7 @@
#define USB_DEVICE_ID_HP_X2_10_COVER	0x0755
#define I2C_DEVICE_ID_HP_ENVY_X360_15	0x2d05
#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100	0x29CF
#define I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV	0x2CF9
#define I2C_DEVICE_ID_HP_SPECTRE_X360_15	0x2817
#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN	0x2544
#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN	0x2706
@@ -995,7 +996,10 @@
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S	0x8003

#define USB_VENDOR_ID_PLANTRONICS	0x047f
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES	0xc055
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES	0xc056
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES	0xc057
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES	0xc058

#define USB_VENDOR_ID_PANASONIC		0x04da
#define USB_DEVICE_ID_PANABOARD_UBT780	0x1044
+2 −0
Original line number Diff line number Diff line
@@ -380,6 +380,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
	  HID_BATTERY_QUIRK_IGNORE },
	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100),
	  HID_BATTERY_QUIRK_IGNORE },
	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV),
	  HID_BATTERY_QUIRK_IGNORE },
	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15),
	  HID_BATTERY_QUIRK_IGNORE },
	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),
+9 −2
Original line number Diff line number Diff line
@@ -2548,12 +2548,17 @@ static int hidpp_ff_init(struct hidpp_device *hidpp,
	struct hid_device *hid = hidpp->hid_dev;
	struct hid_input *hidinput;
	struct input_dev *dev;
	const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor);
	const u16 bcdDevice = le16_to_cpu(udesc->bcdDevice);
	struct usb_device_descriptor *udesc;
	u16 bcdDevice;
	struct ff_device *ff;
	int error, j, num_slots = data->num_effects;
	u8 version;

	if (!hid_is_usb(hid)) {
		hid_err(hid, "device is not USB\n");
		return -ENODEV;
	}

	if (list_empty(&hid->inputs)) {
		hid_err(hid, "no inputs found\n");
		return -ENODEV;
@@ -2567,6 +2572,8 @@ static int hidpp_ff_init(struct hidpp_device *hidpp,
	}

	/* Get firmware release */
	udesc = &(hid_to_usb_dev(hid)->descriptor);
	bcdDevice = le16_to_cpu(udesc->bcdDevice);
	version = bcdDevice & 255;

	/* Set supported force feedback capabilities */
Loading