From: Grant Likely <grant.likely@secretlab.ca>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH 1/2] spi: spi_sh: calling spi_unregister_master instead of spi_master_put in spi_sh_remove
Date: Thu, 19 May 2011 13:01:38 -0600 [thread overview]
Message-ID: <20110519190138.GG5109@ponder.secretlab.ca> (raw)
In-Reply-To: <1305120420.6324.6.camel@phoenix>
On Wed, May 11, 2011 at 09:27:00PM +0800, Axel Lin wrote:
> spi_master_put() should only be used in error handling.
> Once spi_register_master() returns success, we should call
> spi_unregister_master() instead.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks.
g.
> ---
> drivers/spi/spi_sh.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/spi/spi_sh.c b/drivers/spi/spi_sh.c
> index 869a07d..9eedd71 100644
> --- a/drivers/spi/spi_sh.c
> +++ b/drivers/spi/spi_sh.c
> @@ -427,10 +427,10 @@ static int __devexit spi_sh_remove(struct platform_device *pdev)
> {
> struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev);
>
> + spi_unregister_master(ss->master);
> destroy_workqueue(ss->workqueue);
> free_irq(ss->irq, ss);
> iounmap(ss->addr);
> - spi_master_put(ss->master);
>
> return 0;
> }
> --
> 1.7.1
>
>
>
prev parent reply other threads:[~2011-05-19 19:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 13:27 [PATCH 1/2] spi: spi_sh: calling spi_unregister_master instead of spi_master_put in spi_sh_remove Axel Lin
2011-05-11 13:28 ` [PATCH 2/2] spi: spi_tegra: calling spi_unregister_master instead of spi_master_put in spi_tegra_remove Axel Lin
2011-05-19 19:02 ` Grant Likely
2011-05-19 19:01 ` Grant Likely [this message]
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=20110519190138.GG5109@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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).