From: Bjorn Helgaas <bhelgaas@google.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-usb@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Mark Brown <broonie@kernel.org>
Subject: [PATCH 2/3] usb: phy: generic: use forward declarations instead of #includes
Date: Tue, 02 Feb 2016 14:02:44 -0600 [thread overview]
Message-ID: <20160202200244.11646.12411.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20160202200005.11646.98254.stgit@bhelgaas-glaptop2.roam.corp.google.com>
In drivers/usb/phy/phy-generic.h, use forward declarations for struct
regulator and struct gpio_desc instead of including
linux/regulator/consumer.h and linux/gpio/consumer.h.
phy-generic.c is included three places (phy-am335x.c, phy-generic.c,
phy-keystone.c). Of these, phy-am335x.c and phy-generic.c already include
regulator/consumer.h and phy-keystone.c doesn't need it; only phy-generic.c
uses gpiod_*() interfaces, and it already includes gpio/consumer.h.
This is a little more efficient and ensures that users of the regulator and
gpio interfaces include the relevant header files directly rather than
accidentally getting them via drivers/usb/phy/phy-generic.h.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/usb/phy/phy-generic.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/phy/phy-generic.h b/drivers/usb/phy/phy-generic.h
index 0d0eadd..cc4f1bd 100644
--- a/drivers/usb/phy/phy-generic.h
+++ b/drivers/usb/phy/phy-generic.h
@@ -2,8 +2,9 @@
#define _PHY_GENERIC_H_
#include <linux/usb/usb_phy_generic.h>
-#include <linux/gpio/consumer.h>
-#include <linux/regulator/consumer.h>
+
+struct regulator;
+struct gpio_desc;
struct usb_phy_generic {
struct usb_phy phy;
next prev parent reply other threads:[~2016-02-02 20:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 20:02 [PATCH 0/3] USB: PHY: minor include cleanups Bjorn Helgaas
2016-02-02 20:02 ` [PATCH 1/3] usb: phy: generic: use forward declarations instead of #includes Bjorn Helgaas
2016-02-03 18:18 ` Felipe Balbi
2016-02-03 18:46 ` Bjorn Helgaas
2016-02-02 20:02 ` Bjorn Helgaas [this message]
2016-02-02 20:02 ` [PATCH 3/3] usb: phy: phy-am335x: remove include of regulator/consumer.h Bjorn Helgaas
2016-02-02 20:43 ` [PATCH 0/3] USB: PHY: minor include cleanups Mark Brown
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=20160202200244.11646.12411.stgit@bhelgaas-glaptop2.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=balbi@ti.com \
--cc=broonie@kernel.org \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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®