[SCSI] hpsa: use check_signature
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 4 Apr 2012 13:14:59 +0000 (22:14 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 23 Apr 2012 22:16:56 +0000 (23:16 +0100)
Use check_signature to find a signature in the mmio address.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/Kconfig
drivers/scsi/hpsa.c

index 29684c8142b0e62fd814c352d23d955e1aee567e..bea04e5d3b51aa899f917915644b7e3c5748fe7b 100644 (file)
@@ -408,6 +408,7 @@ config BLK_DEV_3W_XXXX_RAID
 config SCSI_HPSA
        tristate "HP Smart Array SCSI driver"
        depends on PCI && SCSI
+       select CHECK_SIGNATURE
        help
          This driver supports HP Smart Array Controllers (circa 2009).
          It is a SCSI alternative to the cciss driver, which is a block
index 500e20dd56ec97c9a339b5386b3b77974dfd6233..f49047478c94c4fb9b8b0c1980196b6389aa4fbf 100644 (file)
@@ -3842,10 +3842,7 @@ static void __devinit hpsa_find_board_params(struct ctlr_info *h)
 
 static inline bool hpsa_CISS_signature_present(struct ctlr_info *h)
 {
-       if ((readb(&h->cfgtable->Signature[0]) != 'C') ||
-           (readb(&h->cfgtable->Signature[1]) != 'I') ||
-           (readb(&h->cfgtable->Signature[2]) != 'S') ||
-           (readb(&h->cfgtable->Signature[3]) != 'S')) {
+       if (!check_signature(h->cfgtable->Signature, "CISS", 4)) {
                dev_warn(&h->pdev->dev, "not a valid CISS config table\n");
                return false;
        }