Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: Remove the optional name of extcon device

This patch removes the optional name of extcon device. Instead,
extcon_dev_register() set the device name as 'extcon[number]' naming pattern.
- /sys/class/extcon/[hardcoded device name] -> /sys/class/extcon/extcon[number]

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>

-9
-1
drivers/extcon/extcon-adc-jack.c
··· 110 110 dev_err(&pdev->dev, "failed to allocate extcon device\n"); 111 111 return -ENOMEM; 112 112 } 113 - data->edev->name = pdata->name; 114 113 115 114 if (!pdata->adc_conditions || 116 115 !pdata->adc_conditions[0].state) {
-1
drivers/extcon/extcon-gpio.c
··· 104 104 dev_err(&pdev->dev, "failed to allocate extcon device\n"); 105 105 return -ENOMEM; 106 106 } 107 - extcon_data->edev->name = pdata->name; 108 107 109 108 extcon_data->gpio = pdata->gpio; 110 109 extcon_data->gpio_active_low = pdata->gpio_active_low;
-2
drivers/extcon/extcon-max14577.c
··· 729 729 return -ENOMEM; 730 730 } 731 731 732 - info->edev->name = dev_name(&pdev->dev); 733 - 734 732 ret = devm_extcon_dev_register(&pdev->dev, info->edev); 735 733 if (ret) { 736 734 dev_err(&pdev->dev, "failed to register extcon device\n");
-1
drivers/extcon/extcon-max77693.c
··· 1158 1158 dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); 1159 1159 return -ENOMEM; 1160 1160 } 1161 - info->edev->name = DEV_NAME; 1162 1161 1163 1162 ret = devm_extcon_dev_register(&pdev->dev, info->edev); 1164 1163 if (ret) {
-1
drivers/extcon/extcon-max8997.c
··· 696 696 ret = -ENOMEM; 697 697 goto err_irq; 698 698 } 699 - info->edev->name = DEV_NAME; 700 699 701 700 ret = devm_extcon_dev_register(&pdev->dev, info->edev); 702 701 if (ret) {
-1
drivers/extcon/extcon-palmas.c
··· 193 193 dev_err(&pdev->dev, "failed to allocate extcon device\n"); 194 194 return -ENOMEM; 195 195 } 196 - palmas_usb->edev->name = kstrdup(node->name, GFP_KERNEL); 197 196 palmas_usb->edev->mutually_exclusive = mutually_exclusive; 198 197 199 198 status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev);
-1
drivers/extcon/extcon-rt8973a.c
··· 631 631 dev_err(info->dev, "failed to allocate memory for extcon\n"); 632 632 return -ENOMEM; 633 633 } 634 - info->edev->name = np->name; 635 634 636 635 /* Register extcon device */ 637 636 ret = devm_extcon_dev_register(info->dev, info->edev);
-1
drivers/extcon/extcon-sm5502.c
··· 623 623 dev_err(info->dev, "failed to allocate memory for extcon\n"); 624 624 return -ENOMEM; 625 625 } 626 - info->edev->name = np->name; 627 626 628 627 /* Register extcon device */ 629 628 ret = devm_extcon_dev_register(info->dev, info->edev);