[SCSI] hpsa: fix potential array overflow in hpsa_update_scsi_devices
[pandora-kernel.git] / drivers / scsi / hpsa.h
index 7f53cea..73858bc 100644 (file)
@@ -95,8 +95,6 @@ struct ctlr_info {
        unsigned long           *cmd_pool_bits;
        int                     nr_allocs;
        int                     nr_frees;
-       int                     busy_initializing;
-       int                     busy_scanning;
        int                     scan_finished;
        spinlock_t              scan_lock;
        wait_queue_head_t       scan_wait_queue;
@@ -104,8 +102,7 @@ struct ctlr_info {
        struct Scsi_Host *scsi_host;
        spinlock_t devlock; /* to protect hba[ctlr]->dev[];  */
        int ndevices; /* number of used elements in .dev[] array. */
-#define HPSA_MAX_SCSI_DEVS_PER_HBA 256
-       struct hpsa_scsi_dev_t *dev[HPSA_MAX_SCSI_DEVS_PER_HBA];
+       struct hpsa_scsi_dev_t *dev[HPSA_MAX_DEVICES];
        /*
         * Performant mode tables.
         */