libertas/sdio: make sure card enters power-off when firmware is loaded.
authorNeilBrown <neilb@suse.de>
Thu, 24 Oct 2013 07:33:33 +0000 (18:33 +1100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 19:32:32 +0000 (14:32 -0500)
Since firmware loading became async it is possible that if_sdio_finish_power_of
is called with only one remaining runtime_pm reference, so it isn't safe
to call pm_runtime_put_noidle.  We must call pm_runtime_put().

Diagnosed-by: "Dr. H. Nikolaus Schaller" <hns@goldelico.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_sdio.c

index 991238afd1b60c04ae437fafeb7a108713ea3134..828e7f4fc6332e0ea3c621a354915f50a70515ac 100644 (file)
@@ -849,7 +849,7 @@ static void if_sdio_finish_power_on(struct if_sdio_card *card)
                        card->started = true;
                        /* Tell PM core that we don't need the card to be
                         * powered now */
-                       pm_runtime_put_noidle(&func->dev);
+                       pm_runtime_put(&func->dev);
                }
        }