mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/8] usb: Add usb_unregister_host()
Date: Fri, 26 Oct 2018 11:33:33 +0200	[thread overview]
Message-ID: <20181026093338.22751-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20181026093338.22751-1-s.hauer@pengutronix.de>

We have usb_register_host() which puts a new host on the list
of hosts we should also have the opposite which removes the
host from the list again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/usb/core/usb.c | 5 +++++
 include/usb/usb.h      | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 70ded6ded1..1e48c1d0a8 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -102,6 +102,11 @@ int usb_register_host(struct usb_host *host)
 	return 0;
 }
 
+void usb_unregister_host(struct usb_host *host)
+{
+	list_del(&host->list);
+}
+
 /**
  * set configuration number to configuration
  */
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 9aab06c87c..eb2eeb8db3 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -157,6 +157,7 @@ struct usb_host {
 };
 
 int usb_register_host(struct usb_host *);
+void usb_unregister_host(struct usb_host *host);
 
 int usb_host_detect(struct usb_host *host);
 
-- 
2.19.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-10-26  9:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26  9:33 [PATCH 0/8] USB ehci/chipidea fixes Sascha Hauer
2018-10-26  9:33 ` [PATCH 1/8] usb: gadget: fsl_udc: Drop using global variable Sascha Hauer
2018-10-26  9:33 ` [PATCH 2/8] usb: host: ehci: rename ehci_priv to ehci_host Sascha Hauer
2018-10-26  9:33 ` Sascha Hauer [this message]
2018-10-26  9:33 ` [PATCH 4/8] usb: host: ehci: add ehci_unregister() Sascha Hauer
2018-10-26  9:33 ` [PATCH 5/8] usb: host: ehci: do not use dev->priv Sascha Hauer
2018-10-26  9:33 ` [PATCH 6/8] usb: host: ehci-atmel: unregister host on device remove Sascha Hauer
2018-10-26  9:33 ` [PATCH 7/8] usb: imx: unregister ehci controller on device removal Sascha Hauer
2018-10-26  9:33 ` [PATCH 8/8] usb: gadget: fsl_udc: pass controller instance to unregister Sascha Hauer

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=20181026093338.22751-4-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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