From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: regarding references taken on platform and codec driver modules Date: Mon, 10 Jan 2011 19:01:54 +0000 Message-ID: <20110110190154.GA11265@opensource.wolfsonmicro.com> References: <98769532B4BB14429434178695419EAE053BF51941@bgsmsx501.gar.corp.intel.com> <20110103155454.GE6783@opensource.wolfsonmicro.com> <98769532B4BB14429434178695419EAE053BF51B26@bgsmsx501.gar.corp.intel.com> <20110103163532.GB7370@opensource.wolfsonmicro.com> <98769532B4BB14429434178695419EAE053BF51BC3@bgsmsx501.gar.corp.intel.com> <20110104154825.GF24774@opensource.wolfsonmicro.com> <98769532B4BB14429434178695419EAE053BFABE47@bgsmsx501.gar.corp.intel.com> <438BB0150E931F4B9CE701519A44630104C119C43D@bgsmsx502.gar.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 37B8D1037EE for ; Mon, 10 Jan 2011 20:03:55 +0100 (CET) Content-Disposition: inline In-Reply-To: <438BB0150E931F4B9CE701519A44630104C119C43D@bgsmsx502.gar.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "Koul, Vinod" Cc: Linux-ALSA , "Harsha, Priya" , Liam Girdwood List-Id: alsa-devel@alsa-project.org On Thu, Jan 06, 2011 at 02:41:29PM +0530, Koul, Vinod wrote: > This issue is on removal of soc_remove() it doesn't free up the reference if the card is not instantiated > So in case one of the probes fails we should handle this in soc_remove in else for instantated > if (rtd->codec->probed) > module_put(rtd->codec->dev->driver->owner); > if (rtd->platform->probed) > module_put(rtd->platform->dev->driver->owner); > for (i = 0; i < card->num_rtd; i++) > module_put(rtd[i].cpu_dai->dev->driver->owner); > Would this be the correct way to solve this? Probably, yes.