diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2015-10-11 00:00:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 07:03:00 +0200 |
commit | ad1bfe410e91189522514ea784668dc75a4e64c4 (patch) | |
tree | 516b42acabd3366dfacc1261b870e58183f5e680 | |
parent | fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000 (diff) | |
download | linux-ad1bfe410e91189522514ea784668dc75a4e64c4.tar.xz linux-ad1bfe410e91189522514ea784668dc75a4e64c4.zip |
vme: 8-bit status/id takes 256 values, not 255
Fixes an off by one array size.
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/vme/vme_bridge.h | 4 | ||||
-rw-r--r-- | include/linux/vme.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/vme/vme_bridge.h b/drivers/vme/vme_bridge.h index 934949abd745..a3ef63b336e4 100644 --- a/drivers/vme/vme_bridge.h +++ b/drivers/vme/vme_bridge.h @@ -1,6 +1,8 @@ #ifndef _VME_BRIDGE_H_ #define _VME_BRIDGE_H_ +#include <linux/vme.h> + #define VME_CRCSR_BUF_SIZE (508*1024) /* * Resource structures @@ -88,7 +90,7 @@ struct vme_callback { struct vme_irq { int count; - struct vme_callback callback[255]; + struct vme_callback callback[VME_NUM_STATUSID]; }; /* Allow 16 characters for name (including null character) */ diff --git a/include/linux/vme.h b/include/linux/vme.h index c0131358f351..71e4a6dec5ac 100644 --- a/include/linux/vme.h +++ b/include/linux/vme.h @@ -81,6 +81,9 @@ struct vme_resource { extern struct bus_type vme_bus_type; +/* Number of VME interrupt vectors */ +#define VME_NUM_STATUSID 256 + /* VME_MAX_BRIDGES comes from the type of vme_bus_numbers */ #define VME_MAX_BRIDGES (sizeof(unsigned int)*8) #define VME_MAX_SLOTS 32 |