aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8925-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/max8925-core.c')
-rw-r--r--drivers/mfd/max8925-core.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 0ad8d9a7c15a..d7abbb354acd 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -859,7 +859,7 @@ int max8925_device_init(struct max8925_chip *chip,
859 859
860 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], 860 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
861 ARRAY_SIZE(rtc_devs), 861 ARRAY_SIZE(rtc_devs),
862 &rtc_resources[0], chip->irq_base, NULL); 862 NULL, chip->irq_base, NULL);
863 if (ret < 0) { 863 if (ret < 0) {
864 dev_err(chip->dev, "Failed to add rtc subdev\n"); 864 dev_err(chip->dev, "Failed to add rtc subdev\n");
865 goto out; 865 goto out;
@@ -867,7 +867,7 @@ int max8925_device_init(struct max8925_chip *chip,
867 867
868 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], 868 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0],
869 ARRAY_SIZE(onkey_devs), 869 ARRAY_SIZE(onkey_devs),
870 &onkey_resources[0], 0, NULL); 870 NULL, 0, NULL);
871 if (ret < 0) { 871 if (ret < 0) {
872 dev_err(chip->dev, "Failed to add onkey subdev\n"); 872 dev_err(chip->dev, "Failed to add onkey subdev\n");
873 goto out_dev; 873 goto out_dev;
@@ -886,21 +886,19 @@ int max8925_device_init(struct max8925_chip *chip,
886 goto out_dev; 886 goto out_dev;
887 } 887 }
888 888
889 if (pdata && pdata->power) { 889 ret = mfd_add_devices(chip->dev, 0, &power_devs[0],
890 ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 890 ARRAY_SIZE(power_devs),
891 ARRAY_SIZE(power_devs), 891 NULL, 0, NULL);
892 &power_supply_resources[0], 0, NULL); 892 if (ret < 0) {
893 if (ret < 0) { 893 dev_err(chip->dev,
894 dev_err(chip->dev, 894 "Failed to add power supply subdev, err = %d\n", ret);
895 "Failed to add power supply subdev\n"); 895 goto out_dev;
896 goto out_dev;
897 }
898 } 896 }
899 897
900 if (pdata && pdata->touch) { 898 if (pdata && pdata->touch) {
901 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], 899 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0],
902 ARRAY_SIZE(touch_devs), 900 ARRAY_SIZE(touch_devs),
903 &touch_resources[0], 0, NULL); 901 NULL, chip->tsc_irq, NULL);
904 if (ret < 0) { 902 if (ret < 0) {
905 dev_err(chip->dev, "Failed to add touch subdev\n"); 903 dev_err(chip->dev, "Failed to add touch subdev\n");
906 goto out_dev; 904 goto out_dev;