Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614542
| From | Boszormenyi Zoltan <zboszor@pr.hu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking |
| Date | 2017-04-01 17:20 +0200 |
| Message-ID | <trsYN-4tP-1@gated-at.bofh.it> (permalink) |
| References | <trsvL-41p-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2017-04-01 16:40 keltezéssel, Alan Stern írta: > 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 <zboszor@pr.hu> >>> >>> 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 <zboszor@pr.hu> >>> --- > >>> 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 <linux/mutex.h> >>> + >>> +#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? Are there? Which subdirectory is better suited? Would it be acceptable to not use a header at all but spell out the "extern struct mutex..." in the two other drivers? Thanks, Zoltán Böszörményi > > 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 > >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] Fix sp5100_tco watchdog driver regression Zoltán Böszörményi <zboszor@pr.hu> - 2017-04-01 12:10 +0200
[PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Zoltán Böszörményi <zboszor@pr.hu> - 2017-04-01 12:10 +0200
[PATCH 3/3] watchdog: sp5100_tco: Synchronize I/O port accesses Zoltan Boszormenyi <zboszor@pr.hu> - 2017-04-01 13:10 +0200
[PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Zoltan Boszormenyi <zboszor@pr.hu> - 2017-04-01 13:10 +0200
Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Greg KH <greg@kroah.com> - 2017-04-01 16:20 +0200
Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Alan Stern <stern@rowland.harvard.edu> - 2017-04-01 16:50 +0200
Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Boszormenyi Zoltan <zboszor@pr.hu> - 2017-04-01 17:20 +0200
Re: [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Boszormenyi Zoltan <zboszor@pr.hu> - 2017-04-01 17:10 +0200
[PATCH 0/3, resend] Fix sp5100_tco watchdog driver regression Zoltan Boszormenyi <zboszor@pr.hu> - 2017-04-01 13:10 +0200
[PATCH 2/3] i2c: i2c-piix4: Synchronize I/O port accesses with the SB800 USB quirk Zoltan Boszormenyi <zboszor@pr.hu> - 2017-04-01 13:10 +0200
csiph-web