Skip to content

Commit

Permalink
USB: host: ohci-at91: depend on OF
Browse files Browse the repository at this point in the history
Make the driver depend on CONFIG_OF and remove the now useless #ifdef

Also, fix the Kconfig indentation.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexandre Belloni authored and Greg Kroah-Hartman committed Aug 14, 2015
1 parent b4f1947 commit be12be5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,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.

Expand Down
9 changes: 1 addition & 8 deletions drivers/usb/host/ohci-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */ }
Expand Down Expand Up @@ -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

/*-------------------------------------------------------------------------*/

Expand Down Expand Up @@ -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,
},
};

Expand Down

0 comments on commit be12be5

Please sign in to comment.