]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/block/skd_main.c
PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
[mirror_ubuntu-zesty-kernel.git] / drivers / block / skd_main.c
index 608532d3f8c910111093c2125e3aa385dbf2e604..8fcdcfb4b47238469022146fe7b1861c904b7a2f 100644 (file)
@@ -4112,16 +4112,14 @@ static int skd_cons_skcomp(struct skd_device *skdev)
                 skdev->name, __func__, __LINE__,
                 nbytes, SKD_N_COMPLETION_ENTRY);
 
-       skcomp = pci_alloc_consistent(skdev->pdev, nbytes,
-                                     &skdev->cq_dma_address);
+       skcomp = pci_zalloc_consistent(skdev->pdev, nbytes,
+                                      &skdev->cq_dma_address);
 
        if (skcomp == NULL) {
                rc = -ENOMEM;
                goto err_out;
        }
 
-       memset(skcomp, 0, nbytes);
-
        skdev->skcomp_table = skcomp;
        skdev->skerr_table = (struct fit_comp_error_info *)((char *)skcomp +
                                                           sizeof(*skcomp) *
@@ -4304,15 +4302,14 @@ static int skd_cons_skspcl(struct skd_device *skdev)
 
                nbytes = SKD_N_SPECIAL_FITMSG_BYTES;
 
-               skspcl->msg_buf = pci_alloc_consistent(skdev->pdev, nbytes,
-                                                      &skspcl->mb_dma_address);
+               skspcl->msg_buf =
+                       pci_zalloc_consistent(skdev->pdev, nbytes,
+                                             &skspcl->mb_dma_address);
                if (skspcl->msg_buf == NULL) {
                        rc = -ENOMEM;
                        goto err_out;
                }
 
-               memset(skspcl->msg_buf, 0, nbytes);
-
                skspcl->req.sg = kzalloc(sizeof(struct scatterlist) *
                                         SKD_N_SG_PER_SPECIAL, GFP_KERNEL);
                if (skspcl->req.sg == NULL) {
@@ -4353,25 +4350,21 @@ static int skd_cons_sksb(struct skd_device *skdev)
 
        nbytes = SKD_N_INTERNAL_BYTES;
 
-       skspcl->data_buf = pci_alloc_consistent(skdev->pdev, nbytes,
-                                               &skspcl->db_dma_address);
+       skspcl->data_buf = pci_zalloc_consistent(skdev->pdev, nbytes,
+                                                &skspcl->db_dma_address);
        if (skspcl->data_buf == NULL) {
                rc = -ENOMEM;
                goto err_out;
        }
 
-       memset(skspcl->data_buf, 0, nbytes);
-
        nbytes = SKD_N_SPECIAL_FITMSG_BYTES;
-       skspcl->msg_buf = pci_alloc_consistent(skdev->pdev, nbytes,
-                                              &skspcl->mb_dma_address);
+       skspcl->msg_buf = pci_zalloc_consistent(skdev->pdev, nbytes,
+                                               &skspcl->mb_dma_address);
        if (skspcl->msg_buf == NULL) {
                rc = -ENOMEM;
                goto err_out;
        }
 
-       memset(skspcl->msg_buf, 0, nbytes);
-
        skspcl->req.sksg_list = skd_cons_sg_list(skdev, 1,
                                                 &skspcl->req.sksg_dma_address);
        if (skspcl->req.sksg_list == NULL) {
@@ -4773,7 +4766,7 @@ static const struct block_device_operations skd_blockdev_ops = {
  *****************************************************************************
  */
 
-static DEFINE_PCI_DEVICE_TABLE(skd_pci_tbl) = {
+static const struct pci_device_id skd_pci_tbl[] = {
        { PCI_VENDOR_ID_STEC, PCI_DEVICE_ID_S1120,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
        { 0 }                     /* terminate list */