ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid
authorTony Lindgren <tony@atomide.com>
Fri, 12 Feb 2016 16:56:52 +0000 (08:56 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 12 Feb 2016 16:56:52 +0000 (08:56 -0800)
commitcf26f1137333251f3515dea31f95775b99df0fd5
tree6db45242fd172ed2fa1f56b0c5fb97c2f78fae81
parent08c78e9d61a857c9077240e7ddb67550c6f96d06
ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid

If a driver PM runtime is disabled via sysfs, and the module is
unloaded, PM runtime can't do anything to disable the device. Let's
let the interconnect disable the device on BUS_NOTIFY_UNBOUND_DRIVER.

Otherwise omap_device will produce and error on the following module
reload. This can be easily tested with something like:

# modprobe omap_hsmmc
# echo on > /sys/devices/platform/68000000.ocp/4809c000.mmc/power/control
# rmmod omap_hsmmc
# modprobe omap_hsmmc

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Nishanth Menon <nm@ti.com>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Reported-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_device.c