dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
- if (pdata == NULL || pdata->dcdc[id] == NULL)
- return -ENODEV;
-
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data);
config.dev = pdev->dev.parent;
- config.init_data = pdata->dcdc[id];
+ if (pdata)
+ config.init_data = pdata->dcdc[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
- if (pdata == NULL || pdata->dcdc[id] == NULL)
- return -ENODEV;
-
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
dcdc->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
- config.init_data = pdata->dcdc[id];
+ if (pdata)
+ config.init_data = pdata->dcdc[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1);
- if (pdata == NULL || pdata->epe[id] == NULL)
- return -ENODEV;
-
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
dcdc->desc.enable_mask = 1 << dcdc->desc.id;
config.dev = pdev->dev.parent;
- config.init_data = pdata->epe[id];
+ if (pdata)
+ config.init_data = pdata->epe[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
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");
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;
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");
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;
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");
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;