From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guennadi Liakhovetski Subject: Re: [PATCH/RFC] MMC: remove unbalanced pm_runtime_suspend() Date: Wed, 20 Apr 2011 00:59:31 +0200 (CEST) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from moutng.kundenserver.de ([212.227.17.8]:58387 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347Ab1DSW7f (ORCPT ); Tue, 19 Apr 2011 18:59:35 -0400 In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Alan Stern Cc: Ohad Ben-Cohen , linux-mmc@vger.kernel.org, Magnus Damm , Simon Horman , "Rafael J. Wysocki" Thanks to all for clarifications. Since everyone is convinced, that that idle function in mmc bus.c is appropriate, I restored it and managed to achieve my goals also without it by adjusting the platform runtime pm and power domain prototype support. But I still need those "cheating" calls to pm_runtime_put_noidle(&pdev->dev); and pm_runtime_get_noresume(&pdev->dev); in the sh_mmcif.c driver. If I use the patch as posted at http://article.gmane.org/gmane.linux.ports.sh.devel/10724 but without those two calls, and load and unload the driver, while a card is plugged in, unloading the driver doesn't power down the interface, because the usage_count == 1 also after the kernel has soft-ejected the card mmc0: card 0001 removed With my put_noidle() / get_noresume() hack all cases of modprobe / rmmod, card insert / eject work correctly. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/