#if 1
if (act8846->pmic_hold_gpio) {
gpio_direction_output(act8846->pmic_hold_gpio,0);
- msleep(100);
+ mdelay(100);
arm_pm_restart('h', "charge");
}
if (pdev) {
act8846->num_regulators = act8846_NUM_REGULATORS;
- act8846->rdev = kcalloc(act8846_NUM_REGULATORS,sizeof(struct regulator_dev *), GFP_KERNEL);
+ act8846->rdev = devm_kcalloc(act8846->dev,
+ act8846_NUM_REGULATORS,
+ sizeof(struct regulator_dev *),
+ GFP_KERNEL);
if (!act8846->rdev) {
return -ENOMEM;
}
for (i = 0; i < act8846->num_regulators; i++)
if (act8846->rdev[i])
regulator_unregister(act8846->rdev[i]);
- kfree(act8846->rdev);
i2c_set_clientdata(i2c, NULL);
- kfree(act8846);
return 0;
}