+ struct dev_pm_domain_attach_data pd_data = {
+ .pd_names = 0,
+ .num_pd_names = 0,
+ };
Please remove the added local variable.
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc)
return -ENOMEM;
+ ret = devm_pm_domain_attach_list(dev, &pd_data, &cc->pd_list);
Please simplify it to
ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);