Skip to content

Commit 0015000

Browse files
Mark WareBen Dooks
Mark Ware
authored and
Ben Dooks
committed
---
yaml --- r: 144867 b: refs/heads/rpi-3.6.y c: 36521c2 h: refs/heads/rpi-3.6.y i: 144865: 9f217ae 144863: 5fb466f v: v3
1 parent 2b364d9 commit 0015000

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/rpi-3.6.y: 89bc5d4a915dc6675961f797de91748bda87efcc
2+
refs/heads/rpi-3.6.y: 36521c271e5f93b249329ee7f321d27825970e31

trunk/drivers/i2c/busses/i2c-cpm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -531,16 +531,16 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
531531
rbdf = cpm->rbase;
532532

533533
for (i = 0; i < CPM_MAXBD; i++) {
534-
cpm->rxbuf[i] = dma_alloc_coherent(
535-
NULL, CPM_MAX_READ + 1, &cpm->rxdma[i], GFP_KERNEL);
534+
cpm->rxbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev,
535+
CPM_MAX_READ + 1,
536+
&cpm->rxdma[i], GFP_KERNEL);
536537
if (!cpm->rxbuf[i]) {
537538
ret = -ENOMEM;
538539
goto out_muram;
539540
}
540541
out_be32(&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] + 1) & ~1));
541542

542-
cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(
543-
NULL, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL);
543+
cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL);
544544
if (!cpm->txbuf[i]) {
545545
ret = -ENOMEM;
546546
goto out_muram;
@@ -585,10 +585,10 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
585585
out_muram:
586586
for (i = 0; i < CPM_MAXBD; i++) {
587587
if (cpm->rxbuf[i])
588-
dma_free_coherent(NULL, CPM_MAX_READ + 1,
588+
dma_free_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1,
589589
cpm->rxbuf[i], cpm->rxdma[i]);
590590
if (cpm->txbuf[i])
591-
dma_free_coherent(NULL, CPM_MAX_READ + 1,
591+
dma_free_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1,
592592
cpm->txbuf[i], cpm->txdma[i]);
593593
}
594594
cpm_muram_free(cpm->dp_addr);
@@ -619,9 +619,9 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
619619

620620
/* Free all memory */
621621
for (i = 0; i < CPM_MAXBD; i++) {
622-
dma_free_coherent(NULL, CPM_MAX_READ + 1,
622+
dma_free_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1,
623623
cpm->rxbuf[i], cpm->rxdma[i]);
624-
dma_free_coherent(NULL, CPM_MAX_READ + 1,
624+
dma_free_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1,
625625
cpm->txbuf[i], cpm->txdma[i]);
626626
}
627627

0 commit comments

Comments
 (0)