lkml.org 
[lkml]   [2020]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] usb typec: mt6360: Add support for mt6360 Type-C driver
From
Date
On 8/26/20 6:11 PM, 啟原黃 wrote:
> Guenter Roeck <linux@roeck-us.net> 於 2020年8月27日 週四 上午9:02寫道:
>>
>> On 8/26/20 5:59 PM, 啟原黃 wrote:
>> [ ... ]
>>>>> +static int mt6360_tcpc_remove(struct platform_device *pdev)
>>>>> +{
>>>>> + struct mt6360_tcpc_info *mti = platform_get_drvdata(pdev);
>>>>> +
>>>>> + tcpci_unregister_port(mti->tcpci);
>>>>
>>>> That leaves interrupts enabled, which might be racy
>>>> because interrupts are still enabled here.
>>> M..., yes, it will cause the race condition during module remove.
>>> I'll add disable_irq before tcpci unregister to prevent it.
>>
>> Or just set TCPC_ALERT_MASK to 0, as in tcpci.c.
> Both are right, Thx. I'll choose one.
>
> BTW, it seems enum typec_cc_status is used by tcpci.h.
> If I don't include tcpm.h, it will raise a warning during the compile time.

Ok, thanks for the note (that means tcpci.h should include
linux/usb/tcpm.h, really).

Guenter

\
 
 \ /
  Last update: 2020-08-27 04:07    [W:0.034 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site