Skip to content

Commit d71aadd

Browse files
committed
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>
1 parent 638f958 commit d71aadd

File tree

8 files changed

+0
-9
lines changed

8 files changed

+0
-9
lines changed

drivers/extcon/extcon-adc-jack.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ static int adc_jack_probe(struct platform_device *pdev)
110110
dev_err(&pdev->dev, "failed to allocate extcon device\n");
111111
return -ENOMEM;
112112
}
113-
data->edev->name = pdata->name;
114113

115114
if (!pdata->adc_conditions ||
116115
!pdata->adc_conditions[0].state) {

drivers/extcon/extcon-gpio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ static int gpio_extcon_probe(struct platform_device *pdev)
104104
dev_err(&pdev->dev, "failed to allocate extcon device\n");
105105
return -ENOMEM;
106106
}
107-
extcon_data->edev->name = pdata->name;
108107

109108
extcon_data->gpio = pdata->gpio;
110109
extcon_data->gpio_active_low = pdata->gpio_active_low;

drivers/extcon/extcon-max14577.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,6 @@ static int max14577_muic_probe(struct platform_device *pdev)
729729
return -ENOMEM;
730730
}
731731

732-
info->edev->name = dev_name(&pdev->dev);
733-
734732
ret = devm_extcon_dev_register(&pdev->dev, info->edev);
735733
if (ret) {
736734
dev_err(&pdev->dev, "failed to register extcon device\n");

drivers/extcon/extcon-max77693.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,6 @@ static int max77693_muic_probe(struct platform_device *pdev)
11581158
dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
11591159
return -ENOMEM;
11601160
}
1161-
info->edev->name = DEV_NAME;
11621161

11631162
ret = devm_extcon_dev_register(&pdev->dev, info->edev);
11641163
if (ret) {

drivers/extcon/extcon-max8997.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,6 @@ static int max8997_muic_probe(struct platform_device *pdev)
696696
ret = -ENOMEM;
697697
goto err_irq;
698698
}
699-
info->edev->name = DEV_NAME;
700699

701700
ret = devm_extcon_dev_register(&pdev->dev, info->edev);
702701
if (ret) {

drivers/extcon/extcon-palmas.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
193193
dev_err(&pdev->dev, "failed to allocate extcon device\n");
194194
return -ENOMEM;
195195
}
196-
palmas_usb->edev->name = kstrdup(node->name, GFP_KERNEL);
197196
palmas_usb->edev->mutually_exclusive = mutually_exclusive;
198197

199198
status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev);

drivers/extcon/extcon-rt8973a.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
631631
dev_err(info->dev, "failed to allocate memory for extcon\n");
632632
return -ENOMEM;
633633
}
634-
info->edev->name = np->name;
635634

636635
/* Register extcon device */
637636
ret = devm_extcon_dev_register(info->dev, info->edev);

drivers/extcon/extcon-sm5502.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c,
623623
dev_err(info->dev, "failed to allocate memory for extcon\n");
624624
return -ENOMEM;
625625
}
626-
info->edev->name = np->name;
627626

628627
/* Register extcon device */
629628
ret = devm_extcon_dev_register(info->dev, info->edev);

0 commit comments

Comments
 (0)