diff mbox

bcma: gpio: set of_node regardless of the host type

Message ID 20170214220346.10479-1-zajec5@gmail.com (mailing list archive)
State Accepted
Commit a4bb5b1b47cb50ac6feb662fade4608f8dd0248b
Delegated to: Kalle Valo
Headers show

Commit Message

Rafał Miłecki Feb. 14, 2017, 10:03 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

DT allows describing many device types, not only platform ones. If e.g.
bcma is hosted on PCI(e) and it has its of_node, let's pass it to the
GPIO subsystem. This allows GPIO code to handle more hardware details
not only for bcma on a SoC.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/bcma/driver_gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Rafał Miłecki Feb. 14, 2017, 10:06 p.m. UTC | #1
On 14 February 2017 at 23:03, Rafał Miłecki <zajec5@gmail.com> wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> DT allows describing many device types, not only platform ones. If e.g.
> bcma is hosted on PCI(e) and it has its of_node, let's pass it to the
> GPIO subsystem. This allows GPIO code to handle more hardware details
> not only for bcma on a SoC.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

This obviously can wait for 4.12 merge window, no rush.
Kalle Valo March 8, 2017, 3:05 p.m. UTC | #2
Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> DT allows describing many device types, not only platform ones. If e.g.
> bcma is hosted on PCI(e) and it has its of_node, let's pass it to the
> GPIO subsystem. This allows GPIO code to handle more hardware details
> not only for bcma on a SoC.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Patch applied to wireless-drivers-next.git, thanks.

a4bb5b1b47cb bcma: gpio: set of_node regardless of the host type
diff mbox

Patch

diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 771a2a253440..7bde8d7a2816 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -185,8 +185,7 @@  int bcma_gpio_init(struct bcma_drv_cc *cc)
 	chip->owner		= THIS_MODULE;
 	chip->parent		= bcma_bus_get_host_dev(bus);
 #if IS_BUILTIN(CONFIG_OF)
-	if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
-		chip->of_node	= cc->core->dev.of_node;
+	chip->of_node		= cc->core->dev.of_node;
 #endif
 	switch (bus->chipinfo.id) {
 	case BCMA_CHIP_ID_BCM4707: