From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbdDAOkl (ORCPT ); Sat, 1 Apr 2017 10:40:41 -0400 Received: from netrider.rowland.org ([192.131.102.5]:37713 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751564AbdDAOkk (ORCPT ); Sat, 1 Apr 2017 10:40:40 -0400 Date: Sat, 1 Apr 2017 10:40:39 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Greg KH cc: Zoltan Boszormenyi , , , , Subject: Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking In-Reply-To: <20170401135957.GA9493@kroah.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 1 Apr 2017, Greg KH wrote: > On Sat, Apr 01, 2017 at 01:02:21PM +0200, Zoltan Boszormenyi wrote: > > From: Böszörményi Zoltán > > > > This patch adds: > > * a mutex in the USB PCI quirks code for synchronizing access to > > the I/O ports on SB800 > > * a new header that contains symbols for the index and data I/O ports > > and wrappers for locking and unlocking the mutex. > > * locking around the I/O port access for SB800 > > > > Signed-off-by: Zoltan Boszormenyi > > --- > > diff --git a/include/linux/sb800.h b/include/linux/sb800.h > > new file mode 100644 > > index 0000000..5650b7d > > --- /dev/null > > +++ b/include/linux/sb800.h > > @@ -0,0 +1,15 @@ > > + > > +#ifndef SB800_H > > +#define SB800_H > > + > > +#include > > + > > +#define SB800_PIIX4_SMB_IDX 0xcd6 > > +#define SB800_PIIX4_SMB_DATA 0xcd7 > > + > > +extern struct mutex sb800_mutex; > > + > > +#define enter_sb800() mutex_lock(&sb800_mutex) > > +#define leave_sb800() mutex_unlock(&sb800_mutex) Is include/linux/ the best place for this new header file? Aren't there other locations more suitable for something that's board-specific? Alan Stern > Don't hide the mutex, just spell it out in the code itself. No need for > these defines at all. > > thanks, > > greg k-h