diff options
author | Benjamin Herrenschmidt | 2018-06-21 10:00:05 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt | 2018-07-27 01:58:12 +0200 |
commit | 9840fcd8cc43bfba486a53b4461044f1a1189cdc (patch) | |
tree | a2ba69532326e0b578283f277c741b4c7de7a21f /drivers/fsi/fsi-master.h | |
parent | fsi: Add cfam char devices (diff) | |
download | kernel-qcow2-linux-9840fcd8cc43bfba486a53b4461044f1a1189cdc.tar.gz kernel-qcow2-linux-9840fcd8cc43bfba486a53b4461044f1a1189cdc.tar.xz kernel-qcow2-linux-9840fcd8cc43bfba486a53b4461044f1a1189cdc.zip |
fsi: Prevent multiple concurrent rescans
The bus scanning process isn't terribly good at parallel attempts
at rescanning the same bus. Let's have a per-master mutex protecting
the scanning process.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/fsi/fsi-master.h')
-rw-r--r-- | drivers/fsi/fsi-master.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/fsi/fsi-master.h b/drivers/fsi/fsi-master.h index f653f75da7be..040a7d4cf717 100644 --- a/drivers/fsi/fsi-master.h +++ b/drivers/fsi/fsi-master.h @@ -18,6 +18,7 @@ #define DRIVERS_FSI_MASTER_H #include <linux/device.h> +#include <linux/mutex.h> /* Various protocol delays */ #define FSI_ECHO_DELAY_CLOCKS 16 /* Number clocks for echo delay */ @@ -59,6 +60,7 @@ struct fsi_master { int idx; int n_links; int flags; + struct mutex scan_lock; int (*read)(struct fsi_master *, int link, uint8_t id, uint32_t addr, void *val, size_t size); int (*write)(struct fsi_master *, int link, uint8_t id, |