diff options
author | Misael Lopez Cruz <misael.lopez@ti.com> | 2011-09-27 04:40:35 -0500 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-09-27 10:31:12 -0700 |
commit | c0d399488a6763eae4d56a8fc8a057e0fcdf3831 (patch) | |
tree | 12c4a7942e40530ef21ac6cfa894a754326d479b /sound/soc/omap/abe/port_mgr.c | |
parent | 7d1d650161de14c59c76c5623b60600f00e70270 (diff) | |
download | kernel_samsung_tuna-c0d399488a6763eae4d56a8fc8a057e0fcdf3831.zip kernel_samsung_tuna-c0d399488a6763eae4d56a8fc8a057e0fcdf3831.tar.gz kernel_samsung_tuna-c0d399488a6763eae4d56a8fc8a057e0fcdf3831.tar.bz2 |
ASoC: ABE HAL: Warn if trying to disable an already disabled port
Warn if omap_abe_port_disable() is called for an ABE port which is
already disabled.
Change-Id: I9053606cdf7a7d3450ecf27f5b3d0a10f0eb3ec9
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'sound/soc/omap/abe/port_mgr.c')
-rw-r--r-- | sound/soc/omap/abe/port_mgr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/omap/abe/port_mgr.c b/sound/soc/omap/abe/port_mgr.c index dd2faa4..ef9d7a6 100644 --- a/sound/soc/omap/abe/port_mgr.c +++ b/sound/soc/omap/abe/port_mgr.c @@ -189,6 +189,10 @@ int omap_abe_port_disable(struct abe *abe, struct omap_abe_port *port) lport_name[port->logical_id], port->users); spin_lock_irqsave(&abe->lock, flags); + + WARN(!port->users, "port %s phy port %d is already disabled\n", + lport_name[port->logical_id], port->physical_id); + if (port->users == 1 && port_get_num_users(abe, port) == 1) { /* disable the physical port */ pr_debug("port %s phy port %d disabled\n", |