From: Petr Mladek <pmladek@suse.cz>
To: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tejun Heo <tj@kernel.org>,
Joe Lawrence <joe.lawrence@stratus.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Petr Mladek <pmladek@suse.cz>
Subject: [PATCH 3/4] usb: hub: rename *kick_khubd to *kick_hub_wq
Date: Fri, 12 Sep 2014 14:21:07 +0200 [thread overview]
Message-ID: <1410524468-15232-4-git-send-email-pmladek@suse.cz> (raw)
In-Reply-To: <1410524468-15232-1-git-send-email-pmladek@suse.cz>
USB hub started to use a workqueue instead of kthread. Let's make it clear from
the function names.
Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
drivers/usb/core/hcd.c | 4 ++--
drivers/usb/core/hub.c | 16 ++++++++--------
drivers/usb/core/usb.h | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 487abcfcccd8..4bec044a786c 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2386,7 +2386,7 @@ void usb_hc_died (struct usb_hcd *hcd)
/* make khubd clean up old urbs and devices */
usb_set_device_state (hcd->self.root_hub,
USB_STATE_NOTATTACHED);
- usb_kick_khubd (hcd->self.root_hub);
+ usb_kick_hub_wq(hcd->self.root_hub);
}
if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) {
hcd = hcd->shared_hcd;
@@ -2396,7 +2396,7 @@ void usb_hc_died (struct usb_hcd *hcd)
/* make khubd clean up old urbs and devices */
usb_set_device_state(hcd->self.root_hub,
USB_STATE_NOTATTACHED);
- usb_kick_khubd(hcd->self.root_hub);
+ usb_kick_hub_wq(hcd->self.root_hub);
}
}
spin_unlock_irqrestore (&hcd_root_hub_lock, flags);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b31eec65caf7..e5883c8e77c7 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -569,7 +569,7 @@ static int hub_port_status(struct usb_hub *hub, int port1,
return ret;
}
-static void kick_khubd(struct usb_hub *hub)
+static void kick_hub_wq(struct usb_hub *hub)
{
if (!hub->disconnected && !work_pending(&hub->events)) {
/*
@@ -587,12 +587,12 @@ static void kick_khubd(struct usb_hub *hub)
}
}
-void usb_kick_khubd(struct usb_device *hdev)
+void usb_kick_hub_wq(struct usb_device *hdev)
{
struct usb_hub *hub = usb_hub_to_struct_hub(hdev);
if (hub)
- kick_khubd(hub);
+ kick_hub_wq(hub);
}
/*
@@ -614,7 +614,7 @@ void usb_wakeup_notification(struct usb_device *hdev,
hub = usb_hub_to_struct_hub(hdev);
if (hub) {
set_bit(portnum, hub->wakeup_bits);
- kick_khubd(hub);
+ kick_hub_wq(hub);
}
}
EXPORT_SYMBOL_GPL(usb_wakeup_notification);
@@ -654,7 +654,7 @@ static void hub_irq(struct urb *urb)
hub->nerrors = 0;
/* Something happened, let khubd figure it out */
- kick_khubd(hub);
+ kick_hub_wq(hub);
resubmit:
if (hub->quiescing)
@@ -968,7 +968,7 @@ static void hub_port_logical_disconnect(struct usb_hub *hub, int port1)
*/
set_bit(port1, hub->change_bits);
- kick_khubd(hub);
+ kick_hub_wq(hub);
}
/**
@@ -1236,7 +1236,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
&hub->leds, LED_CYCLE_PERIOD);
/* Scan all ports that need attention */
- kick_khubd(hub);
+ kick_hub_wq(hub);
/* Allow autosuspend if it was suppressed */
if (type <= HUB_INIT3)
@@ -5103,7 +5103,7 @@ static void hub_event(struct work_struct *work)
usb_autopm_put_interface(intf);
out:
/* Balance the usb_autopm_get_interface_no_resume() in
- * kick_khubd() and allow autosuspend.
+ * kick_hub_wq() and allow autosuspend.
*
* It has to be done even when the hub was disconnected
* when waiting for hdev lock. This function is called
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index d9d08720c386..b1b34d0557c9 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -48,7 +48,7 @@ static inline unsigned usb_get_max_power(struct usb_device *udev,
return c->desc.bMaxPower * mul;
}
-extern void usb_kick_khubd(struct usb_device *dev);
+extern void usb_kick_hub_wq(struct usb_device *dev);
extern int usb_match_one_id_intf(struct usb_device *dev,
struct usb_host_interface *intf,
const struct usb_device_id *id);
--
1.8.4
next prev parent reply other threads:[~2014-09-12 12:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 12:21 [PATCH 0/4] usb: hub: convert khubd into workqueue Petr Mladek
2014-09-12 12:21 ` [PATCH 1/4] " Petr Mladek
2014-09-12 14:16 ` Alan Stern
2014-09-12 15:08 ` Petr Mladek
2014-09-12 15:44 ` Alan Stern
2014-09-16 9:10 ` Petr Mládek
2014-09-16 15:17 ` Petr Mládek
2014-09-16 15:32 ` Alan Stern
2014-09-12 18:08 ` Tejun Heo
2014-09-12 12:21 ` [PATCH 2/4] usb: hub: remove obsolete while cycle in hub_event() Petr Mladek
2014-09-12 14:23 ` Alan Stern
2014-09-17 15:24 ` Petr Mládek
2014-09-17 16:01 ` Alan Stern
2014-09-12 12:21 ` Petr Mladek [this message]
2014-09-12 12:21 ` [PATCH 4/4] usb: hub: rename khubd to hub_wq in documentation and comments Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410524468-15232-4-git-send-email-pmladek@suse.cz \
--to=pmladek@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=joe.lawrence@stratus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®