From patchwork Tue Feb 2 20:02:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 577568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 82D98140C5D for ; Wed, 3 Feb 2016 07:03:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756296AbcBBUCs (ORCPT ); Tue, 2 Feb 2016 15:02:48 -0500 Received: from mail.kernel.org ([198.145.29.136]:58513 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756238AbcBBUCr (ORCPT ); Tue, 2 Feb 2016 15:02:47 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B64B202C8; Tue, 2 Feb 2016 20:02:46 +0000 (UTC) Received: from localhost (unknown [146.7.4.78]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48F51202B8; Tue, 2 Feb 2016 20:02:45 +0000 (UTC) Subject: [PATCH 2/3] usb: phy: generic: use forward declarations instead of #includes To: Felipe Balbi From: Bjorn Helgaas Cc: Alexandre Courbot , Greg Kroah-Hartman , Linus Walleij , linux-usb@vger.kernel.org, Liam Girdwood , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Mark Brown Date: Tue, 02 Feb 2016 14:02:44 -0600 Message-ID: <20160202200244.11646.12411.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20160202200005.11646.98254.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20160202200005.11646.98254.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, NML_ADSP_CUSTOM_MED,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- drivers/usb/phy/phy-generic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 -#include -#include + +struct regulator; +struct gpio_desc; struct usb_phy_generic { struct usb_phy phy;