Re: [PATCH] net: usb: qmi_wwan: add wrappers for subdriver methods

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

 



Oliver Neukum <oliver@xxxxxxxxxx> writes:

> Am Dienstag, 24. Januar 2012, 01:53:29 schrieb Bjørn Mork:
>> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
>> ---
>> Missed this one.  Which you'll probably want if you are going to suspend 
>> the device.  And explains why I return the pointer to the cdc-wdm
>> driver.
>
> Have you thought about order here? Either you call the subdriver first
> or second. I can't tell you right away what is the right order, but in any
> case suspend and resume need to mirror each other.

You're right.  Although the two drivers still are working independently
of each other, it does make more sense to mirror these.

>> +/* need these wrappers to make cdc-wdm happy */
>> +static int qmi_wwan_suspend(struct usb_interface *intf, pm_message_t message)
>> +{
>> +	struct usbnet *dev = usb_get_intfdata(intf);
>> +	struct usb_driver *subdriver = (void *)dev->data[0];
>> +	int ret;
>> +
>> +	ret = usbnet_suspend(intf, message);
>
> Error handling?

Yes, will add.  Hmm, will require calling resume of the first driver in
case the second fails. 


Bjørn
--
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