Re: [PATCH 5/6] phy: qcom-usb-hs: Fix unbalanced notifier registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 August 2018 at 19:27, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> wrote:
> On Tue 21 Aug 06:55 PDT 2018, Loic Poulain wrote:
>
>> Phy power on/off cycle can happen several times during device life.
>> We then need to balance the extcon notifier registration accordingly.
>>
>> Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API")
>> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxx>
>> ---
>>  drivers/phy/qualcomm/phy-qcom-usb-hs.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hs.c b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
>> index 2d0c70b..92e9d94 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-usb-hs.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
>> @@ -181,6 +181,12 @@ static int qcom_usb_hs_phy_power_off(struct phy *phy)
>>  {
>>       struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy);
>>
>> +     if (uphy->vbus_edev) {
>> +             devm_extcon_unregister_notifier(&uphy->ulpi->dev,
>> +                                             uphy->vbus_edev, EXTCON_USB,
>> +                                             &uphy->vbus_notify);
>
> As I presume the power_on should always be matched with a power_off I
> wonder if it really is appropriate to use the devres version of this
> API.
>
> Should we drop the devm_ from registration in power_on as well?

Yes, thanks, I'll drop the devres version.

Regards,
Loic



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux