[PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver
John Linn
John.Linn at xilinx.com
Fri Jul 4 03:59:50 EST 2008
In reviewing the data sheet for the device, I don't see any shared
information between the 2 channels of the device.
The mutex looks like it's not needed to me also.
I'll review with some others here to make sure I'm not overlooking
something.
-- John
> -----Original Message-----
> From: Grant Likely [mailto:glikely at secretlab.ca] On Behalf Of Grant
Likely
> Sent: Thursday, July 03, 2008 11:42 AM
> To: Dmitry Torokhov
> Cc: John Linn; linuxppc-dev at ozlabs.org; linux-input at vger.kernel.org;
jwboyer at linux.vnet.ibm.com;
> jacmet at sunsite.dk; Sadanand Mutyala
> Subject: Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2
driver
>
> 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.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
More information about the Linuxppc-dev
mailing list