From: David Brownell <david-b@pacbell.net>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH 11/12] spi : Use mutex instead of semaphore in driver core
Date: Fri, 28 Dec 2007 17:37:12 -0800 [thread overview]
Message-ID: <200712281737.13145.david-b@pacbell.net> (raw)
In-Reply-To: <20071229011858.GL2883@darkstar.te-china.tietoenator.com>
On Friday 28 December 2007, Dave Young wrote:
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
ACK ... if the driver core is changing, this is obvious.
> ---
> drivers/spi/spi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -upr linux/drivers/spi/spi.c linux.new/drivers/spi/spi.c
> --- linux/drivers/spi/spi.c 2007-12-28 10:47:38.000000000 +0800
> +++ linux.new/drivers/spi/spi.c 2007-12-28 10:48:22.000000000 +0800
> @@ -494,7 +494,7 @@ struct spi_master *spi_busnum_to_master(
> struct spi_master *master = NULL;
> struct spi_master *m;
>
> - down(&spi_master_class.sem);
> + mutex_lock(&spi_master_class.mutex);
> list_for_each_entry(dev, &spi_master_class.children, node) {
> m = container_of(dev, struct spi_master, dev);
> if (m->bus_num == bus_num) {
> @@ -502,7 +502,7 @@ struct spi_master *spi_busnum_to_master(
> break;
> }
> }
> - up(&spi_master_class.sem);
> + mutex_unlock(&spi_master_class.mutex);
> return master;
> }
> EXPORT_SYMBOL_GPL(spi_busnum_to_master);
>
prev parent reply other threads:[~2007-12-29 1:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-29 1:18 [PATCH 11/12] spi : Use mutex instead of semaphore in driver core Dave Young
2007-12-29 1:37 ` David Brownell [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=200712281737.13145.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=hidave.darkstar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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