From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: [PATCH 5/6] HID: hid-sensor-hub: use mfd_add_hotplug_devices helper Date: Fri, 26 Sep 2014 12:55:32 +0200 Message-ID: <1411728933-13351-6-git-send-email-johan@kernel.org> References: <1411728933-13351-1-git-send-email-johan@kernel.org> Return-path: In-Reply-To: <1411728933-13351-1-git-send-email-johan@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Samuel Ortiz , Lee Jones Cc: Jiri Kosina , linux-input@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Johan Hovold List-Id: linux-input@vger.kernel.org Use mfd_add_hotplug_devices helper to register the subdevices. Compile-only tested. Signed-off-by: Johan Hovold --- drivers/hid/hid-sensor-hub.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 2ac25760a9a9..fbe1a6d2aa53 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -641,9 +641,6 @@ static int sensor_hub_probe(struct hid_device *hdev, 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_client_cnt].name = name; sd->hid_sensor_hub_client_devs[ sd->hid_sensor_client_cnt].platform_data = @@ -659,8 +656,9 @@ static int sensor_hub_probe(struct hid_device *hdev, if (last_hsdev) last_hsdev->end_collection_index = i; - ret = mfd_add_devices(&hdev->dev, 0, sd->hid_sensor_hub_client_devs, - sd->hid_sensor_client_cnt, NULL, 0, NULL); + ret = mfd_add_hotplug_devices(&hdev->dev, + sd->hid_sensor_hub_client_devs, + sd->hid_sensor_client_cnt); if (ret < 0) goto err_stop_hw; -- 1.8.5.5