|
@@ -273,9 +273,6 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
|
|
|
|
|
|
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
|
|
|
|
|
|
- if (pdata == NULL || pdata->ldo[id] == NULL)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
|
|
|
if (ldo == NULL) {
|
|
|
dev_err(&pdev->dev, "Unable to allocate private data\n");
|
|
@@ -305,7 +302,8 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
|
|
|
ldo->desc.enable_mask = 1 << id;
|
|
|
|
|
|
config.dev = pdev->dev.parent;
|
|
|
- config.init_data = pdata->ldo[id];
|
|
|
+ if (pdata)
|
|
|
+ config.init_data = pdata->ldo[id];
|
|
|
config.driver_data = ldo;
|
|
|
config.regmap = wm831x->regmap;
|
|
|
|
|
@@ -531,9 +529,6 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
|
|
|
|
|
|
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
|
|
|
|
|
|
- if (pdata == NULL || pdata->ldo[id] == NULL)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
|
|
|
if (ldo == NULL) {
|
|
|
dev_err(&pdev->dev, "Unable to allocate private data\n");
|
|
@@ -563,7 +558,8 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
|
|
|
ldo->desc.enable_mask = 1 << id;
|
|
|
|
|
|
config.dev = pdev->dev.parent;
|
|
|
- config.init_data = pdata->ldo[id];
|
|
|
+ if (pdata)
|
|
|
+ config.init_data = pdata->ldo[id];
|
|
|
config.driver_data = ldo;
|
|
|
config.regmap = wm831x->regmap;
|
|
|
|
|
@@ -719,9 +715,6 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
|
|
|
|
|
|
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
|
|
|
|
|
|
- if (pdata == NULL || pdata->ldo[id] == NULL)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
|
|
|
if (ldo == NULL) {
|
|
|
dev_err(&pdev->dev, "Unable to allocate private data\n");
|
|
@@ -751,7 +744,8 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
|
|
|
ldo->desc.enable_mask = 1 << id;
|
|
|
|
|
|
config.dev = pdev->dev.parent;
|
|
|
- config.init_data = pdata->ldo[id];
|
|
|
+ if (pdata)
|
|
|
+ config.init_data = pdata->ldo[id];
|
|
|
config.driver_data = ldo;
|
|
|
config.regmap = wm831x->regmap;
|
|
|
|