* [PATCH] extcon: palmas: explicitly set edev name as node name
@ 2014-03-28 6:51 Kishon Vijay Abraham I
2014-03-28 14:49 ` Felipe Balbi
2014-04-10 3:49 ` Chanwoo Choi
0 siblings, 2 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2014-03-28 6:51 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi, linux-kernel; +Cc: kishon, gregkh, balbi
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>
---
drivers/extcon/extcon-palmas.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 2aea4bc..51dee21 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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] extcon: palmas: explicitly set edev name as node name
2014-03-28 6:51 [PATCH] extcon: palmas: explicitly set edev name as node name Kishon Vijay Abraham I
@ 2014-03-28 14:49 ` Felipe Balbi
2014-04-10 3:49 ` Chanwoo Choi
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2014-03-28 14:49 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: myungjoo.ham, cw00.choi, linux-kernel, gregkh, balbi
[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]
On Fri, Mar 28, 2014 at 12:21:02PM +0530, Kishon Vijay Abraham I wrote:
> 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>
Thanks Kishon, I tested something similar yesterday and I saw that it
helped a lot. I'm still missing something (maybe DTS) because dwc3 still
didn't probe even after fixing this.
Reviewed-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/extcon/extcon-palmas.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 2aea4bc..51dee21 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;
> }
> --
> 1.7.9.5
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] extcon: palmas: explicitly set edev name as node name
2014-03-28 6:51 [PATCH] extcon: palmas: explicitly set edev name as node name Kishon Vijay Abraham I
2014-03-28 14:49 ` Felipe Balbi
@ 2014-04-10 3:49 ` Chanwoo Choi
2014-04-23 5:51 ` Kishon Vijay Abraham I
1 sibling, 1 reply; 4+ messages in thread
From: Chanwoo Choi @ 2014-04-10 3:49 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: myungjoo.ham, linux-kernel, gregkh, balbi
Hi Kishon,
On 03/28/2014 03:51 PM, Kishon Vijay Abraham I wrote:
> 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>
> ---
Applied this patch
but, you could check this patch on extcon-next branch
after few days. becuase I have firewall issue of kerner.org.
Thanks,
Chanwoo Choi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] extcon: palmas: explicitly set edev name as node name
2014-04-10 3:49 ` Chanwoo Choi
@ 2014-04-23 5:51 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-23 5:51 UTC (permalink / raw)
To: Chanwoo Choi; +Cc: myungjoo.ham, linux-kernel, gregkh, balbi
Hi Chanwoo,
On Thursday 10 April 2014 09:19 AM, Chanwoo Choi wrote:
> Hi Kishon,
>
> On 03/28/2014 03:51 PM, Kishon Vijay Abraham I wrote:
>> 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>
>> ---
>
> Applied this patch
> but, you could check this patch on extcon-next branch
> after few days. becuase I have firewall issue of kerner.org.
I see the commit being merged in extcon-next branch. Will you be sending it in
this -rc cycle?
Thanks
Kishon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-23 5:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 6:51 [PATCH] extcon: palmas: explicitly set edev name as node name Kishon Vijay Abraham I
2014-03-28 14:49 ` Felipe Balbi
2014-04-10 3:49 ` Chanwoo Choi
2014-04-23 5:51 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox