extcon: Remove the optional name of extcon device
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 May 2015 11:20:27 +0000 (20:20 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 19 May 2015 07:39:06 +0000 (16:39 +0900)
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>
drivers/extcon/extcon-adc-jack.c
drivers/extcon/extcon-gpio.c
drivers/extcon/extcon-max14577.c
drivers/extcon/extcon-max77693.c
drivers/extcon/extcon-max8997.c
drivers/extcon/extcon-palmas.c
drivers/extcon/extcon-rt8973a.c
drivers/extcon/extcon-sm5502.c

index 768eaed66380031e79ea7b15037081c410bbfacf..5bf08ec1cacfa77e8860f81acafdf28deac3f2af 100644 (file)
@@ -110,7 +110,6 @@ static int adc_jack_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "failed to allocate extcon device\n");
                return -ENOMEM;
        }
-       data->edev->name = pdata->name;
 
        if (!pdata->adc_conditions ||
                        !pdata->adc_conditions[0].state) {
index 7af33fc433cd07618ddd647c071402132f5f3c22..355459a54e8b4fabe8c496fedeae7cef7d66add6 100644 (file)
@@ -104,7 +104,6 @@ static int gpio_extcon_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "failed to allocate extcon device\n");
                return -ENOMEM;
        }
-       extcon_data->edev->name = pdata->name;
 
        extcon_data->gpio = pdata->gpio;
        extcon_data->gpio_active_low = pdata->gpio_active_low;
index 6d5febe91a39134e2abb905b363cf72c49234bba..ad8f8ddc8e51860dc30c0ca368bdf0c13f3c9fad 100644 (file)
@@ -729,8 +729,6 @@ static int max14577_muic_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       info->edev->name = dev_name(&pdev->dev);
-
        ret = devm_extcon_dev_register(&pdev->dev, info->edev);
        if (ret) {
                dev_err(&pdev->dev, "failed to register extcon device\n");
index a4fe7fd3f74d6265b096c24fd09cee860aaa9dbe..c274249245ff9b8f0faf657980225be8c8881603 100644 (file)
@@ -1158,7 +1158,6 @@ static int max77693_muic_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
                return -ENOMEM;
        }
-       info->edev->name = DEV_NAME;
 
        ret = devm_extcon_dev_register(&pdev->dev, info->edev);
        if (ret) {
index da269a170fd8d8fe21dcfbff335a571156156b00..33613c490d346913558e505a292e3689c114724d 100644 (file)
@@ -696,7 +696,6 @@ static int max8997_muic_probe(struct platform_device *pdev)
                ret = -ENOMEM;
                goto err_irq;
        }
-       info->edev->name = DEV_NAME;
 
        ret = devm_extcon_dev_register(&pdev->dev, info->edev);
        if (ret) {
index 11c6757b6c4051b8a4198ecf6b2631591f264e9d..9c8943d691b1f80d90a2038233a5beb0ec9c53b9 100644 (file)
@@ -193,7 +193,6 @@ static int palmas_usb_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "failed to allocate extcon device\n");
                return -ENOMEM;
        }
-       palmas_usb->edev->name = kstrdup(node->name, GFP_KERNEL);
        palmas_usb->edev->mutually_exclusive = mutually_exclusive;
 
        status = devm_extcon_dev_register(&pdev->dev, palmas_usb->edev);
index 8c2194fde387aebb63baaf8532a5fd486c5d404a..04447f36c994f0243fc665187ea7dd91bbc06561 100644 (file)
@@ -631,7 +631,6 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
                dev_err(info->dev, "failed to allocate memory for extcon\n");
                return -ENOMEM;
        }
-       info->edev->name = np->name;
 
        /* Register extcon device */
        ret = devm_extcon_dev_register(info->dev, info->edev);
index 2f93cf3078521e7c2f635ed9320b1d7984a383e5..6f1d11f8723bb1df4f3b92a3949effdda3624357 100644 (file)
@@ -623,7 +623,6 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c,
                dev_err(info->dev, "failed to allocate memory for extcon\n");
                return -ENOMEM;
        }
-       info->edev->name = np->name;
 
        /* Register extcon device */
        ret = devm_extcon_dev_register(info->dev, info->edev);