lkml.org 
[lkml]   [2011]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "usb_wwan: error case of resume" (16871dcac) is buggy

[ fixing Oliver's address in CC ]

On Mon, 21 Mar 2011, Jiri Kosina wrote:

> Hi,
>
> the commit in subject make the kernel with CONFIG_PM_RUNTIME unset fail
> during compilation, as struct dev_pm_info doesn't have whole bunch of
> members in such case.
>
> The commit in question adds this code:
>
> /* we have to throw away the rest */
> do {
> unbusy_queued_urb(urb, portdata);
> //extremely dirty
> atomic_dec(&port->serial->interface->dev.power.usage_count);
> } while ((urb = usb_get_from_anchor(&portdata->delayed)));
>
> The 'extermely dirty' comment makes me a bit nervous whether the patch
> below is correct or some more thinking would be necessary.
>
>
>
> From: Jiri Kosina <jkosina@suse.cz>
> Subject: [PATCH] USB: usb_wvan: fix compilation for !CONFIG_PM_RUNTIME case
>
> With CONFIG_PM_RUNTIME unset, struct dev_pm_info doesn't have
> usage count which is used only for run-time power management
> purposes.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
> drivers/usb/serial/usb_wwan.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
> index a65ddd5..8b456dc 100644
> --- a/drivers/usb/serial/usb_wwan.c
> +++ b/drivers/usb/serial/usb_wwan.c
> @@ -698,8 +698,10 @@ static void play_delayed(struct usb_serial_port *port)
> /* we have to throw away the rest */
> do {
> unbusy_queued_urb(urb, portdata);
> - //extremely dirty
> +#ifdef CONFIG_PM_RUNTIME
> + /* extremely dirty */
> atomic_dec(&port->serial->interface->dev.power.usage_count);
> +#endif
> } while ((urb = usb_get_from_anchor(&portdata->delayed)));
> break;
> }
> --
> 1.7.3.1
>
>

--
Jiri Kosina
SUSE Labs, Novell Inc.


\
 
 \ /
  Last update: 2011-03-21 01:43    [W:2.730 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site