From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: [PATCH 2/6] mfd: rtsx_usb: fix platform device-id collision Date: Fri, 26 Sep 2014 12:55:29 +0200 Message-ID: <1411728933-13351-3-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-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Samuel Ortiz , Lee Jones Cc: Jiri Kosina , linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Johan Hovold List-Id: linux-input@vger.kernel.org Hot-pluggable multi-function devices should use PLATFORM_DEVID_AUTO to avoid name collisions on the platform bus. This driver currently uses the USB-device address as an id. This makes name collisions unlikely, but it could still happen if two devices are connected to separate buses and gets assigned the same address. Signed-off-by: Johan Hovold --- drivers/mfd/rtsx_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/rtsx_usb.c b/drivers/mfd/rtsx_usb.c index 71f387ce8cbd..78073e4b87e4 100644 --- a/drivers/mfd/rtsx_usb.c +++ b/drivers/mfd/rtsx_usb.c @@ -647,7 +647,7 @@ 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, + ret = mfd_add_devices(&intf->dev, PLATFORM_DEVID_AUTO, rtsx_usb_cells, ARRAY_SIZE(rtsx_usb_cells), NULL, 0, NULL); if (ret) goto out_init_fail; -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html