]> git.ipfire.org Git - people/ms/linux.git/commitdiff
dca: check against empty dca_domains list before unregister provider fix
authorJiri Slaby <jslaby@suse.cz>
Sun, 3 Mar 2013 22:09:07 +0000 (06:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:09:07 +0000 (06:09 +0800)
In 3.0.67, commit 7a9a20ea77e7508c795dead9ab2f6c98a617762d (dca: check
against empty dca_domains list before unregister provider), upstream
commit c419fcfd071cf34ba00f9f65282583772d2655e7, added a fail path to
unregister_dca_provider. It added there also a call to
raw_spin_unlock_irqrestore. But in 3.0, the lock is not raw, so this
results in:
drivers/dca/dca-core.c: In function 'unregister_dca_provider':
drivers/dca/dca-core.c:413: warning: passing argument 1 of '_raw_spin_unlock_irqrestore' from incompatible pointer type

Fix it by calling spin_unlock_irqrestore properly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dca/dca-core.c

index 7065851d0b794e901c1007a9eb02a9ceb9325072..605fd20b1e53292791da667aab4e7546eabf1e91 100644 (file)
@@ -410,7 +410,7 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)
        spin_lock_irqsave(&dca_lock, flags);
 
        if (list_empty(&dca_domains)) {
-               raw_spin_unlock_irqrestore(&dca_lock, flags);
+               spin_unlock_irqrestore(&dca_lock, flags);
                return;
        }