]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "usb: chipidea: remove duplicate dev_set_drvdata for host_start"
authorPeter Chen <peter.chen@freescale.com>
Wed, 24 Dec 2014 03:33:17 +0000 (11:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2015 17:45:30 +0000 (09:45 -0800)
commit4a301d2f1e646de65a368b7b0bdcef89a5140faa
tree181cd98e1804750626c06e4f23074a00dc0e974f
parente89c582635d5d780d19b4179be3c0757f7d4eedf
Revert "usb: chipidea: remove duplicate dev_set_drvdata for host_start"

This reverts commit a14b148949c64e8427425da819ab3f3516c4bd75

It moved platform_set_drvdata(pdev, ci) before hcd is created,
and the hcd will assign itself as ci controller's drvdata during
the hcd creation function (in usb_create_shared_hcd), so it
overwrites the real ci's drvdata which we want to use.

So, if the controller is at host mode, the system suspend
API will get the wrong struct ci_hdrc pointer, and cause the
oops.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c
drivers/usb/chipidea/host.c