mfd: Use mfd_add_hotplug_devices() helper
authorJohan Hovold <johan@kernel.org>
Fri, 26 Sep 2014 10:55:31 +0000 (12:55 +0200)
committerLee Jones <lee.jones@linaro.org>
Tue, 25 Nov 2014 16:18:42 +0000 (16:18 +0000)
Use mfd_add_hotplug_devices helper to register the subdevices.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rtsx_usb.c
drivers/mfd/viperboard.c

index 9cf98d142d9acff26ba0ada4b3f3e2107a8218e8..dbdd0faeb6ce500678d9dc4f014504560693bded 100644 (file)
@@ -647,8 +647,8 @@ static int rtsx_usb_probe(struct usb_interface *intf,
        /* initialize USB SG transfer timer */
        setup_timer(&ucr->sg_timer, rtsx_usb_sg_timed_out, (unsigned long) ucr);
 
-       ret = mfd_add_devices(&intf->dev, usb_dev->devnum, rtsx_usb_cells,
-                       ARRAY_SIZE(rtsx_usb_cells), NULL, 0, NULL);
+       ret = mfd_add_hotplug_devices(&intf->dev, rtsx_usb_cells,
+                                     ARRAY_SIZE(rtsx_usb_cells));
        if (ret)
                goto out_init_fail;
 
index e00f5340ed872089d31998ff39d6bb57842e731a..e6b3c70aeb22cc919e0fef9f0ba8ad04cd3b56fa 100644 (file)
@@ -93,8 +93,8 @@ static int vprbrd_probe(struct usb_interface *interface,
                 version >> 8, version & 0xff,
                 vb->usb_dev->bus->busnum, vb->usb_dev->devnum);
 
-       ret = mfd_add_devices(&interface->dev, -1, vprbrd_devs,
-                               ARRAY_SIZE(vprbrd_devs), NULL, 0, NULL);
+       ret = mfd_add_hotplug_devices(&interface->dev, vprbrd_devs,
+                                     ARRAY_SIZE(vprbrd_devs));
        if (ret != 0) {
                dev_err(&interface->dev, "Failed to add mfd devices to core.");
                goto error;