History log of /drivers/usb/phy/phy-gpio-vbus-usb.c
Revision Date Author Comments
0c5824083b8ca4aff083dc74024d0bfd46f9da9d 10-Aug-2014 Himangi Saraogi <himangi774@gmail.com> usb: phy: drop kfree of devm_kzalloc's data

Using kfree to free data allocated with devm_kzalloc causes double frees.

The Coccinelle semantic patch that fixes this problem is as follows:

// <smpl>
@@
expression x;
@@

x = devm_kzalloc(...)
...
?-kfree(x);
// </smpl>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9f7b23ce88e9eb1194485b3399dfc83c24fb3634 03-Jun-2014 Himangi Saraogi <himangi774@gmail.com> usb: phy: phy-gpio-vbus-usb: use devm_ functions

The various devm_ functions allocate memory that is released when a
driver detaches. This patch uses devm_kzalloc, devm_request_irq,
devm_gpio_request, devm_regulator_get etc. for data that is
allocated in the probe function of a platform device and is only
freed in the remove function. The corresponding free functions are
removed and the labels are done away with.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
31e322272d9d7da0724ae6e3180478575aa48909 11-Dec-2013 Neil Zhang <zhangwm@marvell.com> usb: phy: initialize the notifier when add a new phy

We need to initialize the notifer before use it.

So lets initialize it when add a new phy device to
reduce the code redundancy.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
17dab4d5b13fa438cc111611dcc4ac9a631deab9 23-Sep-2013 Johan Hovold <jhovold@gmail.com> usb: phy: gpio-vbus: fix deferred probe from __init

Move probe out of __init section and don't use platform_driver_probe
which cannot be used with deferred probing.

Since commit e9354576 ("gpiolib: Defer failed gpio requests by default")
and 04bf3011 ("regulator: Support driver probe deferral") this driver
might return -EPROBE_DEFER if a gpio_request or regulator_get fails.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
eaaa775b5f934f09b1f6ee91418ed97a8fdf0b7c 23-Sep-2013 Johan Hovold <jhovold@gmail.com> usb: phy: gpio-vbus: fix deferred probe from __init

Move probe out of __init section and don't use platform_driver_probe
which cannot be used with deferred probing.

Since commit e9354576 ("gpiolib: Defer failed gpio requests by default")
and 04bf3011 ("regulator: Support driver probe deferral") this driver
might return -EPROBE_DEFER if a gpio_request or regulator_get fails.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
19f9e188deb4bbcd5fc588f39dc63bdfa9103827 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> usb: phy: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
1abd8b3172b701ed626df4ebf09b7fe7f329888a 10-May-2013 Robert Jarzmik <robert.jarzmik@free.fr> usb: phy: Fix NULL pointer exception during usb_get_phy

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@free.fr>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
a9b1bddc7a171c89b4fd4c132202b5b2118f3905 06-May-2013 Sachin Kamat <sachin.kamat@linaro.org> usb: phy: gpio-vbus-usb: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
e8d891fb7b8fe4ee7311820594323d46dbc31d45 20-Mar-2013 Felipe Balbi <balbi@ti.com> usb: phy: gpio-vbus: don't ignore regulator APIs return value

Due to recent changes to regulator API, all
users which don't check regulator_{en,dis}able()'s
return value will generate compile warnings.

Add such checks to gpio-vbus.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
94ae98433a397dd4695652fc62ca7bc784b08216 07-Mar-2013 Felipe Balbi <balbi@ti.com> usb: phy: rename all phy drivers to phy-$name-usb.c

this will make sure that we have sensible names
for all phy drivers. Current situation was already
quite bad with too generic names being used.

Signed-off-by: Felipe Balbi <balbi@ti.com>