diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2014-03-28 07:51:02 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2014-04-22 08:41:10 +0200 |
commit | f63d32d4080407176082ef2cc439a3c81b15af16 (patch) | |
tree | 9cd02f8155452c6cf1e6bf927310690694001761 /drivers/extcon/extcon-palmas.c | |
parent | Linux 3.15-rc2 (diff) | |
download | linux-f63d32d4080407176082ef2cc439a3c81b15af16.tar.xz linux-f63d32d4080407176082ef2cc439a3c81b15af16.zip |
extcon: palmas: explicitly set edev name as node name
commit ca488 (extcon: of: Remove unnecessary function call by using the
name of device_node) started using node name instead of device name
to get the extcon device. This breaks dwc3-omap since it's not able to
get the extcon device anymore. Fixed it by setting edev name of
palmas to be the same as its node name.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reported-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-palmas.c')
-rw-r--r-- | drivers/extcon/extcon-palmas.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index ddff2b72f0a8..51db5bcef720 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -23,6 +23,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <linux/err.h> #include <linux/mfd/palmas.h> #include <linux/of.h> @@ -188,11 +189,13 @@ static int palmas_usb_probe(struct platform_device *pdev) palmas_usb->edev.supported_cable = palmas_extcon_cable; palmas_usb->edev.dev.parent = palmas_usb->dev; + palmas_usb->edev.name = kstrdup(node->name, GFP_KERNEL); palmas_usb->edev.mutually_exclusive = mutually_exclusive; status = extcon_dev_register(&palmas_usb->edev); if (status) { dev_err(&pdev->dev, "failed to register extcon device\n"); + kfree(palmas_usb->edev.name); return status; } @@ -230,6 +233,7 @@ static int palmas_usb_probe(struct platform_device *pdev) fail_extcon: extcon_dev_unregister(&palmas_usb->edev); + kfree(palmas_usb->edev.name); return status; } @@ -239,6 +243,7 @@ static int palmas_usb_remove(struct platform_device *pdev) struct palmas_usb *palmas_usb = platform_get_drvdata(pdev); extcon_dev_unregister(&palmas_usb->edev); + kfree(palmas_usb->edev.name); return 0; } |