ctrl->write_cmd = spmi_write_cmd;
ret = spmi_controller_add(ctrl);
- if (ret) {
- dev_err(&pdev->dev, "spmi_add_controller failed!\n");
+ if (ret)
goto err_add_controller;
- }
+
+ dev_info(&pdev->dev, "spmi_add_controller initialized\n");
+ return 0;
+
err_add_controller:
+ dev_err(&pdev->dev, "spmi_add_controller failed!\n");
platform_set_drvdata(pdev, NULL);
return ret;
}
},
{}
};
+MODULE_DEVICE_TABLE(of, spmi_controller_match_table);
static struct platform_driver spmi_controller_driver = {
.probe = spmi_controller_probe,
.remove = spmi_del_controller,
.driver = {
.name = SPMI_CONTROLLER_NAME,
- .owner = THIS_MODULE,
.of_match_table = spmi_controller_match_table,
},
};