diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2014-04-14 05:17:12 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-04-23 09:07:16 -0400 |
commit | 4005da5ce8cd21e2566a3cb51f74be9acdc457a9 (patch) | |
tree | be035c425be44ffc93852f297551893999cd2b92 /drivers/extcon | |
parent | a798c10faf62a505d24e5f6213fbaf904a39623f (diff) |
extcon: max14577: Change extcon name instead of static name according to device type
This patch use device name to make sysfs path according to device type:
max14577-muic
- /sys/class/extcon/max14577-muic/
max77836-muic
- /sys/class/extcon/max77836-muic/
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 3846941801b8..59f084fee4f3 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/mfd/max14577-private.h> | 24 | #include <linux/mfd/max14577-private.h> |
25 | #include <linux/extcon.h> | 25 | #include <linux/extcon.h> |
26 | 26 | ||
27 | #define DEV_NAME "max14577-muic" | ||
28 | #define DELAY_MS_DEFAULT 17000 /* unit: millisecond */ | 27 | #define DELAY_MS_DEFAULT 17000 /* unit: millisecond */ |
29 | 28 | ||
30 | enum max14577_muic_adc_debounce_time { | 29 | enum max14577_muic_adc_debounce_time { |
@@ -673,7 +672,8 @@ static int max14577_muic_probe(struct platform_device *pdev) | |||
673 | dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); | 672 | dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); |
674 | return -ENOMEM; | 673 | return -ENOMEM; |
675 | } | 674 | } |
676 | info->edev->name = DEV_NAME; | 675 | |
676 | info->edev->name = dev_name(&pdev->dev); | ||
677 | info->edev->supported_cable = max14577_extcon_cable; | 677 | info->edev->supported_cable = max14577_extcon_cable; |
678 | ret = extcon_dev_register(info->edev); | 678 | ret = extcon_dev_register(info->edev); |
679 | if (ret) { | 679 | if (ret) { |
@@ -737,7 +737,7 @@ static int max14577_muic_remove(struct platform_device *pdev) | |||
737 | 737 | ||
738 | static struct platform_driver max14577_muic_driver = { | 738 | static struct platform_driver max14577_muic_driver = { |
739 | .driver = { | 739 | .driver = { |
740 | .name = DEV_NAME, | 740 | .name = "max14577-muic", |
741 | .owner = THIS_MODULE, | 741 | .owner = THIS_MODULE, |
742 | }, | 742 | }, |
743 | .probe = max14577_muic_probe, | 743 | .probe = max14577_muic_probe, |