File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
drivers/i3c/master/mipi-i3c-hci Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -382,14 +382,11 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
382
382
return - ENOMEM ;
383
383
384
384
for (i = 0 ; i < nxfers ; i ++ ) {
385
- xfer [i ].data = i2c_xfers [i ]. buf ;
385
+ xfer [i ].data = i2c_get_dma_safe_msg_buf ( & i2c_xfers [i ], 1 ) ;
386
386
xfer [i ].data_len = i2c_xfers [i ].len ;
387
387
xfer [i ].rnw = i2c_xfers [i ].flags & I2C_M_RD ;
388
388
hci -> cmd -> prep_i2c_xfer (hci , dev , & xfer [i ]);
389
389
xfer [i ].cmd_desc [0 ] |= CMD_0_ROC ;
390
- ret = i3c_hci_alloc_safe_xfer_buf (hci , & xfer [i ]);
391
- if (ret )
392
- goto out ;
393
390
}
394
391
last = i - 1 ;
395
392
xfer [last ].cmd_desc [0 ] |= CMD_0_TOC ;
@@ -412,7 +409,8 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
412
409
413
410
out :
414
411
for (i = 0 ; i < nxfers ; i ++ )
415
- i3c_hci_free_safe_xfer_buf (hci , & xfer [i ]);
412
+ i2c_put_dma_safe_msg_buf (xfer [i ].data , & i2c_xfers [i ],
413
+ ret ? false : true);
416
414
417
415
hci_free_xfer (xfer , nxfers );
418
416
return ret ;
You can’t perform that action at this time.
0 commit comments