aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-max77693.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index f0f18e29ae07..2c7c3e191591 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -1175,23 +1175,22 @@ static int max77693_muic_probe(struct platform_device *pdev)
1175 } 1175 }
1176 1176
1177 /* Initialize extcon device */ 1177 /* Initialize extcon device */
1178 info->edev = devm_kzalloc(&pdev->dev, sizeof(struct extcon_dev), 1178 info->edev = devm_extcon_dev_allocate(&pdev->dev,
1179 GFP_KERNEL); 1179 max77693_extcon_cable);
1180 if (!info->edev) { 1180 if (IS_ERR(info->edev)) {
1181 dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); 1181 dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
1182 ret = -ENOMEM; 1182 ret = -ENOMEM;
1183 goto err_irq; 1183 goto err_irq;
1184 } 1184 }
1185 info->edev->name = DEV_NAME; 1185 info->edev->name = DEV_NAME;
1186 info->edev->dev.parent = &pdev->dev; 1186 info->edev->dev.parent = &pdev->dev;
1187 info->edev->supported_cable = max77693_extcon_cable; 1187
1188 ret = devm_extcon_dev_register(&pdev->dev, info->edev); 1188 ret = devm_extcon_dev_register(&pdev->dev, info->edev);
1189 if (ret) { 1189 if (ret) {
1190 dev_err(&pdev->dev, "failed to register extcon device\n"); 1190 dev_err(&pdev->dev, "failed to register extcon device\n");
1191 goto err_irq; 1191 goto err_irq;
1192 } 1192 }
1193 1193
1194
1195 /* Initialize MUIC register by using platform data or default data */ 1194 /* Initialize MUIC register by using platform data or default data */
1196 if (pdata && pdata->muic_data) { 1195 if (pdata && pdata->muic_data) {
1197 init_data = pdata->muic_data->init_data; 1196 init_data = pdata->muic_data->init_data;