Skip to contentSkip to conversation

usb_wwan: fix build error in play_delayed.

PATCH In review Tao Ma 3 participants 3 messages Mar 22, 2011

Subsystems (2)
lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 usb_wwan: fix build error in play_delayed.

From: Tao Ma <[email protected]>

There is a build error in today's linus tree.
drivers/usb/serial/usb_wwan.c: In function ‘play_delayed’:
drivers/usb/serial/usb_wwan.c:702: error: ‘struct dev_pm_info’ has no member named ‘usage_count’ The reason is that usage_count is wrapped with macro CONFIG_PM_RUNTIME
now in dev_pm_info.

So use the corresponding pm_runtime_get_noresume instead.

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/usb/serial/usb_wwan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/serial/usb_wwan.c +1 -1
index a65ddd5..5858ce4 100644
@@ -699,7 +699,7 @@ static void play_delayed(struct usb_serial_port *port)
 			do {
 				unbusy_queued_urb(urb, portdata);
 				//extremely dirty
-				atomic_dec(&port->serial->interface->dev.power.usage_count);
+				pm_runtime_get_noresume(&port->serial->interface->dev);
 			} while ((urb = usb_get_from_anchor(&portdata->delayed)));
 			break;
 		}
Signature · 1 line
1.6.3.GIT
#1 lore raw
Quoted 21 lines · Tao Ma

From: Tao Ma <[email protected]>

There is a build error in today's linus tree.
drivers/usb/serial/usb_wwan.c: In function ‘play_delayed’:
drivers/usb/serial/usb_wwan.c:702: error: ‘struct dev_pm_info’ has no member named ‘usage_count’ The reason is that usage_count is wrapped with macro CONFIG_PM_RUNTIME
now in dev_pm_info.

So use the corresponding pm_runtime_get_noresume instead.

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/usb/serial/usb_wwan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/serial/usb_wwan.c +0 -0
index a65ddd5..5858ce4 100644

drivers/usb/serial/usb_wwan.c static void play_delayed(struct usb_serial_port *port) · line 705

Quoted 8 lines
drivers/usb/serial/usb_wwan.c +1 -1
@@ -699,7 +699,7 @@ static void play_delayed(struct usb_serial_port *port)
 			do {
 				unbusy_queued_urb(urb, portdata);
 				//extremely dirty
-				atomic_dec(&port->serial->interface->dev.power.usage_count);
+				pm_runtime_get_noresume(&port->serial->interface->dev);
 			} while ((urb = usb_get_from_anchor(&portdata->delayed)));
 			break;
 		}

Oh well, thats the third time this patch is sent

#2 lore raw
Quoted 17 lines · Eric Dumazet
Quoted 16 lines · Tao Ma

From: Tao Ma <[email protected]>

There is a build error in today's linus tree.
drivers/usb/serial/usb_wwan.c: In function ‘play_delayed’:
drivers/usb/serial/usb_wwan.c:702: error: ‘struct dev_pm_info’ has no member named ‘usage_count’ The reason is that usage_count is wrapped with macro CONFIG_PM_RUNTIME
now in dev_pm_info.

So use the corresponding pm_runtime_get_noresume instead.

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/usb/serial/usb_wwan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines

drivers/usb/serial/usb_wwan.c static void play_delayed(struct usb_serial_port *port) · line 705

Quoted 13 lines
drivers/usb/serial/usb_wwan.c +1 -1
index a65ddd5..5858ce4 100644
@@ -699,7 +699,7 @@ static void play_delayed(struct usb_serial_port *port)
 			do {
 				unbusy_queued_urb(urb, portdata);
 				//extremely dirty
-				atomic_dec(&port->serial->interface->dev.power.usage_count);
+				pm_runtime_get_noresume(&port->serial->interface->dev);
 			} while ((urb = usb_get_from_anchor(&portdata->delayed)));
 			break;
 		}

Oh well, thats the third time this patch is sent

Yes, sorry, been busy with other stuff, this will get fixed soon, I have enough copies of it in my queue :)

thanks,

greg k-h