Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726AbbHJOYZ (ORCPT ); Mon, 10 Aug 2015 10:24:25 -0400 Received: from down.free-electrons.com ([37.187.137.238]:36650 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752603AbbHJOXV (ORCPT ); Mon, 10 Aug 2015 10:23:21 -0400 From: Alexandre Belloni To: Alan Stern Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, Nicolas Ferre , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 2/4] USB: host: ohci-at91: depend on OF Date: Mon, 10 Aug 2015 16:23:10 +0200 Message-Id: <1439216592-11381-3-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439216592-11381-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1439216592-11381-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2178 Lines: 71 Make the driver depend on CONFIG_OF and remove the now useless #ifdef Also, fix the Kconfig indentation. Signed-off-by: Alexandre Belloni --- drivers/usb/host/Kconfig | 8 ++++---- drivers/usb/host/ohci-at91.c | 9 +-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8afc3c1efdab..7ef56faf09bb 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -441,10 +441,10 @@ config USB_OHCI_HCD_PXA27X PXA27x/PXA3xx chips. config USB_OHCI_HCD_AT91 - tristate "Support for Atmel on-chip OHCI USB controller" - depends on USB_OHCI_HCD && ARCH_AT91 - default y - ---help--- + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 && OF + default y + ---help--- Enables support for the on-chip OHCI controller on Atmel chips. diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 72dc4f9e2a0f..8e17d5ba26c6 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -442,7 +442,6 @@ static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data) return IRQ_HANDLED; } -#ifdef CONFIG_OF static const struct of_device_id at91_ohci_dt_ids[] = { { .compatible = "atmel,at91rm9200-ohci" }, { /* sentinel */ } @@ -492,12 +491,6 @@ static int ohci_at91_of_init(struct platform_device *pdev) return 0; } -#else -static int ohci_at91_of_init(struct platform_device *pdev) -{ - return 0; -} -#endif /*-------------------------------------------------------------------------*/ @@ -684,7 +677,7 @@ static struct platform_driver ohci_hcd_at91_driver = { .driver = { .name = "at91_ohci", .pm = &ohci_hcd_at91_pm_ops, - .of_match_table = of_match_ptr(at91_ohci_dt_ids), + .of_match_table = at91_ohci_dt_ids, }, }; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/