Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16b5fe29 authored by Johan Hovold's avatar Johan Hovold Committed by Lee Jones
Browse files

HID: hid-sensor-hub: Use mfd_add_hotplug_devices() helper



Use mfd_add_hotplug_devices() helper to register the subdevices.

Compile-only tested.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 1ab589c7
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -640,9 +640,6 @@ static int sensor_hub_probe(struct hid_device *hdev,
					ret = -ENOMEM;
					ret = -ENOMEM;
					goto err_stop_hw;
					goto err_stop_hw;
			}
			}
			sd->hid_sensor_hub_client_devs[
				sd->hid_sensor_client_cnt].id =
							PLATFORM_DEVID_AUTO;
			sd->hid_sensor_hub_client_devs[
			sd->hid_sensor_hub_client_devs[
				sd->hid_sensor_client_cnt].name = name;
				sd->hid_sensor_client_cnt].name = name;
			sd->hid_sensor_hub_client_devs[
			sd->hid_sensor_hub_client_devs[
@@ -659,8 +656,9 @@ static int sensor_hub_probe(struct hid_device *hdev,
	if (last_hsdev)
	if (last_hsdev)
		last_hsdev->end_collection_index = i;
		last_hsdev->end_collection_index = i;


	ret = mfd_add_devices(&hdev->dev, 0, sd->hid_sensor_hub_client_devs,
	ret = mfd_add_hotplug_devices(&hdev->dev,
		sd->hid_sensor_client_cnt, NULL, 0, NULL);
			sd->hid_sensor_hub_client_devs,
			sd->hid_sensor_client_cnt);
	if (ret < 0)
	if (ret < 0)
		goto err_stop_hw;
		goto err_stop_hw;