From: Tyrel Datwyler Date: Tue, 29 Jul 2014 17:48:13 +0000 (-0400) Subject: powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal X-Git-Tag: omap-for-v3.17/fixes-against-rc2~134^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7340056567e32b2c9d3554eb146e1977c93da116;p=pandora-kernel.git powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal Commit bcdde7e made __sysfs_remove_dir() recursive and introduced a BUG_ON during PHB removal while attempting to delete the power managment attribute group of the bus. This is a result of tearing the bridge and bus devices down out of order in remove_phb_dynamic. Since, the the bus resides below the bridge in the sysfs device tree it should be torn down first. This patch simply moves the device_unregister call for the PHB bridge device after the device_unregister call for the PHB bus. Fixes: bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive") Cc: stable@vger.kernel.org Signed-off-by: Tyrel Datwyler Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed