Re: Phy and gpio_vbus breakage in 3.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Balbi <balbi@xxxxxx> writes:

> it is, please send a proper patch.
Done.
I think others should have a look too, especially :
 - fsl_otg.c
 - isp1301_omap.c
 - msm_otg.c
 - mv_otg.c
 - twl4030-usb.c

Maybe either Mark or Kishon could repair the remaining drivers, as if I'm not
mistaken the breakage comes from the commit
1dd03d8a510dae402096b194385a1373100450dc "usb: otg: use try_module_get in all
usb_get_phy functions and add missing module_put".

Cheers.

-- 
Robert

PS: For reference for Mark and Kishon, this is the patch for gpio_vbus.c which
was sent to Felipe.

>From 183e835137d5cf81562e286b421dcdc1a63e2825 Mon Sep 17 00:00:00 2001
From: Robert Jarzmik <robert.jarzmik@xxxxxxx>
Date: Thu, 9 May 2013 17:34:35 +0200
Subject: [PATCH] usb: otg: gpio_vbus driver initialisation fix

Upon initialisation (driver probe) a NULL pointer exception
is triggered. This is due to lack of initialisation of
device field in phy structure, which is used by phy
framework in usb_get_phy().

Fix it by initialising the device field.

Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>
---
 drivers/usb/otg/gpio_vbus.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
index a7d4ac5..f65615c 100644
--- a/drivers/usb/otg/gpio_vbus.c
+++ b/drivers/usb/otg/gpio_vbus.c
@@ -264,6 +264,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
 	gpio_vbus->phy.set_power = gpio_vbus_set_power;
 	gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend;
 	gpio_vbus->phy.state = OTG_STATE_UNDEFINED;
+	gpio_vbus->phy.dev = &pdev->dev;
 
 	gpio_vbus->phy.otg->phy = &gpio_vbus->phy;
 	gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux