summaryrefslogtreecommitdiff
path: root/common/image-android.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-07-01 20:53:00 +0200
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:36 -0600
commit6cda369509e0d3fa5f9e33c9d71589c4523799fa (patch)
tree873791a4eda0bd576946357c2d1536dd1139827c /common/image-android.c
parente5c4564ee604412ad818056419306e7dc0bc39ba (diff)
downloadu-boot-imx-6cda369509e0d3fa5f9e33c9d71589c4523799fa.zip
u-boot-imx-6cda369509e0d3fa5f9e33c9d71589c4523799fa.tar.gz
u-boot-imx-6cda369509e0d3fa5f9e33c9d71589c4523799fa.tar.bz2
dm: usb: Use device_unbind_children to clean up usb devs on stop
On an usb stop instead of leaving orphan usb devices behind simply remove them. The result of this commit is best seen in the output of "dm tree" after plugging out an usb hub with 2 devices plugges in and plugging in a keyb. instead, before this commit the output would be: usb [ + ] `-- sunxi-musb usb_hub [ ] |-- usb_hub usb_mass_st [ ] | |-- usb_mass_storage usb_dev_gen [ ] | `-- generic_bus_0_dev_3 usb_dev_gen [ + ] `-- generic_bus_0_dev_1 Notice the non active usb_hub child and its 2 non active children. The first child being non-active as in this example also causes usb_get_dev_index to return NULL when probing the first child, which results in the usb kbd code not binding to the keyboard. With this commit in place the output after swapping and "usb reset" is: usb [ + ] `-- sunxi-musb usb_dev_gen [ + ] `-- generic_bus_0_dev_1 As expected, and usb_get_dev_index works properly and the keyboard works. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image-android.c')
0 files changed, 0 insertions, 0 deletions