diff options
Diffstat (limited to 'drivers/media/pci/pt1/pt1.c')
| -rw-r--r-- | drivers/media/pci/pt1/pt1.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index 72b191cfeb54..1ced093583ac 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c @@ -334,8 +334,7 @@ static int pt1_sync(struct pt1 *pt1) static u64 pt1_identify(struct pt1 *pt1) { int i; - u64 id; - id = 0; + u64 id = 0; for (i = 0; i < 57; i++) { id |= (u64)(pt1_read_reg(pt1, 0) >> 30 & 1) << i; pt1_write_reg(pt1, 0, 0x00000008); @@ -640,7 +639,7 @@ static int pt1_init_tables(struct pt1 *pt1) if (!pt1_nr_tables) return 0; - tables = vmalloc(array_size(pt1_nr_tables, sizeof(struct pt1_table))); + tables = vmalloc_array(pt1_nr_tables, sizeof(struct pt1_table)); if (tables == NULL) return -ENOMEM; @@ -1122,8 +1121,7 @@ static int pt1_i2c_end(struct pt1 *pt1, int addr) static void pt1_i2c_begin(struct pt1 *pt1, int *addrp) { - int addr; - addr = 0; + int addr = 0; pt1_i2c_emit(pt1, addr, 0, 0, 1, 1, addr /* itself */); addr = addr + 1; @@ -1342,7 +1340,7 @@ static int pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret < 0) goto err; - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); if (ret < 0) goto err_pci_disable_device; |
