Re: [PATCH v2 3/4] usb: introduce usb_set_reset_resume

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

 



On Tue, Jun 3, 2014 at 8:22 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 2 Jun 2014, Dan Williams wrote:
>
>> In preparation for moving hub power management logic to its own file and
>> removing instances of #ifdef CONFIG_PM in hub.c, introduce a
>> usb_set_reset_resume() helper.
>>
>> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
>> ---
>>  drivers/usb/core/hub.c |    5 ++---
>>  include/linux/usb.h    |   11 +++++++++++
>>  2 files changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
>> index c8916969d76c..63b1963620a3 100644
>> --- a/drivers/usb/core/hub.c
>> +++ b/drivers/usb/core/hub.c
>> @@ -1172,9 +1172,8 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
>>                               set_bit(port1, hub->change_bits);
>>
>>               } else if (udev->persist_enabled) {
>> -#ifdef CONFIG_PM
>> -                     udev->reset_resume = 1;
>> -#endif
>> +                     usb_set_reset_resume(udev);
>> +
>>                       /* Don't set the change_bits when the device
>>                        * was powered off.
>>                        */
>
> It seems odd that usb_set_reset_resume() gets used here but not in the
> other places where udev->reset_resume gets set to 1 (or to 0 for that
> matter).  Of course, the other places are all inside #ifdef CONFIG_PM
> regions, so they don't need it.
>
> Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Yes, I considered that, but left them alone for now for the sake of
minimizing the patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux