aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8925-core.c
diff options
context:
space:
mode:
authorQing Xu <qingx@marvell.com>2013-02-04 10:40:43 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-02-13 18:23:00 -0500
commitf9ed143180ffe94a617671aa4ed4106ae183407c (patch)
treee1ccc092c2e70a42cd554296eb1366d73d09d6ff /drivers/mfd/max8925-core.c
parent4e405ae256b7e04f7c1213136f3bfd9fb76e2023 (diff)
mfd: max8925: Fix mfd device register failure
we encounter rtc/power/touch driver registry failure, root cause it is resources confilict in insert_resouce, solved by changing mfd_add_devices 5th parameter to NULL Signed-off-by: Qing Xu <qingx@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
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;