lkml.org 
[lkml]   [2023]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] serial: atmel: convert not to use dma_request_slave_channel()
From
On 20. 11. 23, 7:14, claudiu beznea wrote:
> Hi, Christophe,
>
> On 19.11.2023 17:55, Christophe JAILLET wrote:
>> dma_request_slave_channel() is deprecated. dma_request_chan() should
>> be used directly instead.
>>
>> Switch to the preferred function and update the error handling accordingly.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> v2: Also update atmel_prepare_rx_dma()
>> ---
>> drivers/tty/serial/atmel_serial.c | 16 ++++++++++++----
>> 1 file changed, 12 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
>> index 1946fafc3f3e..6aeb4648843b 100644
>> --- a/drivers/tty/serial/atmel_serial.c
>> +++ b/drivers/tty/serial/atmel_serial.c
>> @@ -1013,14 +1013,18 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
>> struct device *mfd_dev = port->dev->parent;
>> dma_cap_mask_t mask;
>> struct dma_slave_config config;
>> + struct dma_chan *chan;
>
> There is no need for this.

How'd you avoid crash in here then:
if (atmel_port->chan_tx)
atmel_release_tx_dma(port);
?

thanks,
--
js
suse labs

\
 
 \ /
  Last update: 2023-11-20 14:05    [W:0.061 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site