linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sadanand <sadanan@xilinx.com>,
	linuxppc-dev@ozlabs.org, linux-input@vger.kernel.org,
	John Linn <john.linn@xilinx.com>
Subject: Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver
Date: Thu, 3 Jul 2008 11:42:29 -0600	[thread overview]
Message-ID: <20080703174229.GL2284@secretlab.ca> (raw)
In-Reply-To: <20080703132305.ZZRA012@mailhub.coreip.homeip.net>

On Thu, Jul 03, 2008 at 01:27:00PM -0400, Dmitry Torokhov wrote:
> Hi John,
> 
> On Thu, Jul 03, 2008 at 09:42:31AM -0700, John Linn wrote:
> > +
> > +	/* Initialize the PS/2 interface */
> > +	mutex_lock(&drvdata->cfg_mutex);
> > +	if (xps2_initialize(drvdata)) {
> > +		mutex_unlock(&drvdata->cfg_mutex);
> > +		dev_err(dev, "Could not initialize device\n");
> > +		retval = -ENODEV;
> > +		goto failed3;
> > +	}
> > +	mutex_unlock(&drvdata->cfg_mutex);
> 
> The drvdata is allocated per-port and so both (there are 2 PS/2 ports,
> right?) ports get their own copy of cfg_mutex. Since you are trying to
> serialze access to resource shared by both ports it will not work.
> The original driver-global mutex was appropriate (the only thing I
> objected there was use of a counting semaphore instead of a mutex).

John, correct me if I'm wrong, but I don't think there are any shared
resources being accessed here and I believe the mutex is entirely
unnecessary.

Cheers,
g.

  reply	other threads:[~2008-07-03 17:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 16:42 [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver John Linn
2008-07-03 17:27 ` Dmitry Torokhov
2008-07-03 17:42   ` Grant Likely [this message]
2008-07-03 17:59     ` John Linn
2008-07-03 17:37 ` Grant Likely
2008-07-03 19:31   ` John Linn
  -- strict thread matches above, loose matches on Subject: below --
2008-06-30 15:38 John Linn
2008-06-30 17:55 ` Peter Korsgaard
2008-06-30 17:59   ` John Linn
2008-06-30 18:21 ` Dmitry Torokhov
2008-06-30 21:28   ` John Linn

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=20080703174229.GL2284@secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=dmitry.torokhov@gmail.com \
    --cc=john.linn@xilinx.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sadanan@xilinx.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).