linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	linux-mmc <linux-mmc@vger.kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Dong Aisheng <dongas86@gmail.com>,
	Dong Aisheng <aisheng.dong@nxp.com>
Subject: Re: [PATCH RFC 2/5] mmc: sdhci: Split sdhci_add_host()
Date: Tue, 5 Jul 2016 12:21:28 +0300	[thread overview]
Message-ID: <577B7C18.3030702@intel.com> (raw)
In-Reply-To: <577B7A23.5030801@intel.com>

On 05/07/16 12:13, Adrian Hunter wrote:
> On 05/07/16 12:02, Jon Hunter wrote:
>>
>> On 28/06/16 14:23, Adrian Hunter wrote:
>>> Split sdhci-add_host() in order to further our objective to make
>>> sdhci into a library.
>>
>> s/sdhci-add_host/sdhci_add_host
> 
> Thanks I'll make that change
> 
>>
>>> The split divides code that sets up mmc and sdhci parameters, from
>>> code that actually activates things - such as tasklet initialization,
>>> requesting the irq, and adding (and starting) the host.
>>>
>>> This gives drivers an opportunity to change various settings before
>>> committing to start the host.
>>>
>>> Drivers can continue to call sdhci_add_host() but drivers that want
>>> to take advantage of the split instead call sdhci_setup_host() followed
>>> by __sdhci_add_host().
>>
>> If sdhci_setup_host() is successful, but then the subsequent call to
>> __sdhci_add_host() fails, then what should be called to clean-up? Does
>> not look like we can still call sdhci_remove_host() in this case.
> 
> Nothing needs to be called because __sdhci_add_host() cleans up for
> sdhci_setup_host() and itself.

I should have written nothing extra needs to be called because you still
need to free the host (i.e. call sdhci_free_host()), but that is the same
whether you use sdhci_add_host() or sdhci_setup_host()+__sdhci_add_host().



  reply	other threads:[~2016-07-05  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 13:23 [PATCH RFC 0/5] mmc: sdhci: Make signal voltage support explicit Adrian Hunter
2016-06-28 13:23 ` [PATCH RFC 1/5] mmc: sdhci: Do not call implementations of mmc host ops directly Adrian Hunter
2016-06-28 13:23 ` [PATCH RFC 2/5] mmc: sdhci: Split sdhci_add_host() Adrian Hunter
2016-07-05  9:02   ` Jon Hunter
2016-07-05  9:13     ` Adrian Hunter
2016-07-05  9:21       ` Adrian Hunter [this message]
2016-06-28 13:23 ` [PATCH RFC 3/5] mmc: sdhci: Make signal voltage support explicit Adrian Hunter
2016-06-28 13:23 ` [PATCH RFC 4/5] mmc: sdhci: Tidy caps variables in sdhci_setup_host() Adrian Hunter
2016-06-28 13:23 ` [PATCH RFC 5/5] mmc: sdhci: Add sdhci_read_caps() Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577B7C18.3030702@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=aisheng.dong@nxp.com \
    --cc=dongas86@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).