From: Ian Abbott <abbotti@mev.co.uk>
To: "Prashant P. Shah" <pshah.mumbai@gmail.com>
Cc: "devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Frank Mori Hess <fmhess@users.sourceforge.net>,
Ian Abbott <ian.abbott@mev.co.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Staging: comedi: dyna_pci10xx: replace semaphore with mutex
Date: Thu, 9 Jun 2011 13:00:02 +0100 [thread overview]
Message-ID: <4DF0B5C2.6030500@mev.co.uk> (raw)
In-Reply-To: <20110609115215.GA14569@mail.fossee.in>
On 09/06/11 12:52, Prashant P. Shah wrote:
> - sema_init(&devpriv->sem, 1);
> + mutex_init(&devpriv->mutex);
> dev->board_ptr = &boardtypes[board_index];
> devpriv->pci_dev = pcidev;
You could call mutex_destroy() in your _detach routine as well. It's
used for debugging mutexes:
static int dyna_pci10xx_detach(struct comedi_device *dev)
{
if (devpriv && devpriv->pci_dev) {
comedi_pci_disable(devpriv->pci_dev);
mutex_destroy(&devpriv->mutex);
}
return 0;
}
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
next prev parent reply other threads:[~2011-06-09 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 11:52 [PATCH] Staging: comedi: dyna_pci10xx: replace semaphore with mutex Prashant P. Shah
2011-06-09 12:00 ` Ian Abbott [this message]
2011-06-13 7:17 ` Prashant Shah
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=4DF0B5C2.6030500@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=devel@linuxdriverproject.org \
--cc=fmhess@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pshah.mumbai@gmail.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