Commit ad1bfe41 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by Greg Kroah-Hartman

vme: 8-bit status/id takes 256 values, not 255

Fixes an off by one array size.
Signed-off-by: default avatarDmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37784706
#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) */
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment