diff options
54 files changed, 125 insertions, 112 deletions
diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index b67a3018b136..ce229ea933d1 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c | |||
@@ -470,7 +470,8 @@ static int __devinit device_800_init(struct pm80x_chip *chip, | |||
470 | 470 | ||
471 | ret = | 471 | ret = |
472 | mfd_add_devices(chip->dev, 0, &onkey_devs[0], | 472 | mfd_add_devices(chip->dev, 0, &onkey_devs[0], |
473 | ARRAY_SIZE(onkey_devs), &onkey_resources[0], 0); | 473 | ARRAY_SIZE(onkey_devs), &onkey_resources[0], 0, |
474 | NULL); | ||
474 | if (ret < 0) { | 475 | if (ret < 0) { |
475 | dev_err(chip->dev, "Failed to add onkey subdev\n"); | 476 | dev_err(chip->dev, "Failed to add onkey subdev\n"); |
476 | goto out_dev; | 477 | goto out_dev; |
@@ -481,7 +482,7 @@ static int __devinit device_800_init(struct pm80x_chip *chip, | |||
481 | rtc_devs[0].platform_data = pdata->rtc; | 482 | rtc_devs[0].platform_data = pdata->rtc; |
482 | rtc_devs[0].pdata_size = sizeof(struct pm80x_rtc_pdata); | 483 | rtc_devs[0].pdata_size = sizeof(struct pm80x_rtc_pdata); |
483 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], | 484 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], |
484 | ARRAY_SIZE(rtc_devs), NULL, 0); | 485 | ARRAY_SIZE(rtc_devs), NULL, 0, NULL); |
485 | if (ret < 0) { | 486 | if (ret < 0) { |
486 | dev_err(chip->dev, "Failed to add rtc subdev\n"); | 487 | dev_err(chip->dev, "Failed to add rtc subdev\n"); |
487 | goto out_dev; | 488 | goto out_dev; |
diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c index 6146583589f6..c20a31136f04 100644 --- a/drivers/mfd/88pm805.c +++ b/drivers/mfd/88pm805.c | |||
@@ -216,7 +216,8 @@ static int __devinit device_805_init(struct pm80x_chip *chip) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | ret = mfd_add_devices(chip->dev, 0, &codec_devs[0], | 218 | ret = mfd_add_devices(chip->dev, 0, &codec_devs[0], |
219 | ARRAY_SIZE(codec_devs), &codec_resources[0], 0); | 219 | ARRAY_SIZE(codec_devs), &codec_resources[0], 0, |
220 | NULL); | ||
220 | if (ret < 0) { | 221 | if (ret < 0) { |
221 | dev_err(chip->dev, "Failed to add codec subdev\n"); | 222 | dev_err(chip->dev, "Failed to add codec subdev\n"); |
222 | goto out_codec; | 223 | goto out_codec; |
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index fca15be6c0d1..4927f4efcf9d 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c | |||
@@ -788,7 +788,7 @@ static void __devinit device_bk_init(struct pm860x_chip *chip, | |||
788 | } | 788 | } |
789 | } | 789 | } |
790 | ret = mfd_add_devices(chip->dev, 0, bk_devs, | 790 | ret = mfd_add_devices(chip->dev, 0, bk_devs, |
791 | ARRAY_SIZE(bk_devs), NULL, 0); | 791 | ARRAY_SIZE(bk_devs), NULL, 0, NULL); |
792 | if (ret < 0) | 792 | if (ret < 0) |
793 | dev_err(chip->dev, "Failed to add backlight subdev\n"); | 793 | dev_err(chip->dev, "Failed to add backlight subdev\n"); |
794 | } | 794 | } |
@@ -808,7 +808,7 @@ static void __devinit device_led_init(struct pm860x_chip *chip, | |||
808 | } | 808 | } |
809 | } | 809 | } |
810 | ret = mfd_add_devices(chip->dev, 0, led_devs, | 810 | ret = mfd_add_devices(chip->dev, 0, led_devs, |
811 | ARRAY_SIZE(led_devs), NULL, 0); | 811 | ARRAY_SIZE(led_devs), NULL, 0, NULL); |
812 | if (ret < 0) { | 812 | if (ret < 0) { |
813 | dev_err(chip->dev, "Failed to add led subdev\n"); | 813 | dev_err(chip->dev, "Failed to add led subdev\n"); |
814 | return; | 814 | return; |
@@ -887,7 +887,7 @@ static void __devinit device_regulator_init(struct pm860x_chip *chip, | |||
887 | reg_devs[15].pdata_size = sizeof(struct regulator_init_data); | 887 | reg_devs[15].pdata_size = sizeof(struct regulator_init_data); |
888 | } | 888 | } |
889 | ret = mfd_add_devices(chip->dev, 0, reg_devs, | 889 | ret = mfd_add_devices(chip->dev, 0, reg_devs, |
890 | ARRAY_SIZE(reg_devs), NULL, 0); | 890 | ARRAY_SIZE(reg_devs), NULL, 0, NULL); |
891 | if (ret < 0) { | 891 | if (ret < 0) { |
892 | dev_err(chip->dev, "Failed to add regulator subdev\n"); | 892 | dev_err(chip->dev, "Failed to add regulator subdev\n"); |
893 | return; | 893 | return; |
@@ -908,7 +908,7 @@ static void __devinit device_rtc_init(struct pm860x_chip *chip, | |||
908 | rtc_devs[0].resources = &rtc_resources[0]; | 908 | rtc_devs[0].resources = &rtc_resources[0]; |
909 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], | 909 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], |
910 | ARRAY_SIZE(rtc_devs), &rtc_resources[0], | 910 | ARRAY_SIZE(rtc_devs), &rtc_resources[0], |
911 | chip->irq_base); | 911 | chip->irq_base, NULL); |
912 | if (ret < 0) | 912 | if (ret < 0) |
913 | dev_err(chip->dev, "Failed to add rtc subdev\n"); | 913 | dev_err(chip->dev, "Failed to add rtc subdev\n"); |
914 | } | 914 | } |
@@ -927,7 +927,7 @@ static void __devinit device_touch_init(struct pm860x_chip *chip, | |||
927 | touch_devs[0].resources = &touch_resources[0]; | 927 | touch_devs[0].resources = &touch_resources[0]; |
928 | ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], | 928 | ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], |
929 | ARRAY_SIZE(touch_devs), &touch_resources[0], | 929 | ARRAY_SIZE(touch_devs), &touch_resources[0], |
930 | chip->irq_base); | 930 | chip->irq_base, NULL); |
931 | if (ret < 0) | 931 | if (ret < 0) |
932 | dev_err(chip->dev, "Failed to add touch subdev\n"); | 932 | dev_err(chip->dev, "Failed to add touch subdev\n"); |
933 | } | 933 | } |
@@ -945,7 +945,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip, | |||
945 | power_devs[0].num_resources = ARRAY_SIZE(battery_resources); | 945 | power_devs[0].num_resources = ARRAY_SIZE(battery_resources); |
946 | power_devs[0].resources = &battery_resources[0], | 946 | power_devs[0].resources = &battery_resources[0], |
947 | ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1, | 947 | ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1, |
948 | &battery_resources[0], chip->irq_base); | 948 | &battery_resources[0], chip->irq_base, NULL); |
949 | if (ret < 0) | 949 | if (ret < 0) |
950 | dev_err(chip->dev, "Failed to add battery subdev\n"); | 950 | dev_err(chip->dev, "Failed to add battery subdev\n"); |
951 | 951 | ||
@@ -954,7 +954,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip, | |||
954 | power_devs[1].num_resources = ARRAY_SIZE(charger_resources); | 954 | power_devs[1].num_resources = ARRAY_SIZE(charger_resources); |
955 | power_devs[1].resources = &charger_resources[0], | 955 | power_devs[1].resources = &charger_resources[0], |
956 | ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1, | 956 | ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1, |
957 | &charger_resources[0], chip->irq_base); | 957 | &charger_resources[0], chip->irq_base, NULL); |
958 | if (ret < 0) | 958 | if (ret < 0) |
959 | dev_err(chip->dev, "Failed to add charger subdev\n"); | 959 | dev_err(chip->dev, "Failed to add charger subdev\n"); |
960 | 960 | ||
@@ -963,7 +963,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip, | |||
963 | power_devs[2].num_resources = ARRAY_SIZE(preg_resources); | 963 | power_devs[2].num_resources = ARRAY_SIZE(preg_resources); |
964 | power_devs[2].resources = &preg_resources[0], | 964 | power_devs[2].resources = &preg_resources[0], |
965 | ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1, | 965 | ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1, |
966 | &preg_resources[0], chip->irq_base); | 966 | &preg_resources[0], chip->irq_base, NULL); |
967 | if (ret < 0) | 967 | if (ret < 0) |
968 | dev_err(chip->dev, "Failed to add preg subdev\n"); | 968 | dev_err(chip->dev, "Failed to add preg subdev\n"); |
969 | } | 969 | } |
@@ -977,7 +977,7 @@ static void __devinit device_onkey_init(struct pm860x_chip *chip, | |||
977 | onkey_devs[0].resources = &onkey_resources[0], | 977 | onkey_devs[0].resources = &onkey_resources[0], |
978 | ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], | 978 | ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], |
979 | ARRAY_SIZE(onkey_devs), &onkey_resources[0], | 979 | ARRAY_SIZE(onkey_devs), &onkey_resources[0], |
980 | chip->irq_base); | 980 | chip->irq_base, NULL); |
981 | if (ret < 0) | 981 | if (ret < 0) |
982 | dev_err(chip->dev, "Failed to add onkey subdev\n"); | 982 | dev_err(chip->dev, "Failed to add onkey subdev\n"); |
983 | } | 983 | } |
@@ -990,7 +990,8 @@ static void __devinit device_codec_init(struct pm860x_chip *chip, | |||
990 | codec_devs[0].num_resources = ARRAY_SIZE(codec_resources); | 990 | codec_devs[0].num_resources = ARRAY_SIZE(codec_resources); |
991 | codec_devs[0].resources = &codec_resources[0], | 991 | codec_devs[0].resources = &codec_resources[0], |
992 | ret = mfd_add_devices(chip->dev, 0, &codec_devs[0], | 992 | ret = mfd_add_devices(chip->dev, 0, &codec_devs[0], |
993 | ARRAY_SIZE(codec_devs), &codec_resources[0], 0); | 993 | ARRAY_SIZE(codec_devs), &codec_resources[0], 0, |
994 | NULL); | ||
994 | if (ret < 0) | 995 | if (ret < 0) |
995 | dev_err(chip->dev, "Failed to add codec subdev\n"); | 996 | dev_err(chip->dev, "Failed to add codec subdev\n"); |
996 | } | 997 | } |
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 44a3fdbadef4..f1beb4971f87 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c | |||
@@ -424,7 +424,7 @@ static int aat2870_i2c_probe(struct i2c_client *client, | |||
424 | } | 424 | } |
425 | 425 | ||
426 | ret = mfd_add_devices(aat2870->dev, 0, aat2870_devs, | 426 | ret = mfd_add_devices(aat2870->dev, 0, aat2870_devs, |
427 | ARRAY_SIZE(aat2870_devs), NULL, 0); | 427 | ARRAY_SIZE(aat2870_devs), NULL, 0, NULL); |
428 | if (ret != 0) { | 428 | if (ret != 0) { |
429 | dev_err(aat2870->dev, "Failed to add subdev: %d\n", ret); | 429 | dev_err(aat2870->dev, "Failed to add subdev: %d\n", ret); |
430 | goto out_disable; | 430 | goto out_disable; |
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index 78fca2902c8d..01781ae5d0d7 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c | |||
@@ -946,7 +946,7 @@ static int __devinit ab3100_probe(struct i2c_client *client, | |||
946 | } | 946 | } |
947 | 947 | ||
948 | err = mfd_add_devices(&client->dev, 0, ab3100_devs, | 948 | err = mfd_add_devices(&client->dev, 0, ab3100_devs, |
949 | ARRAY_SIZE(ab3100_devs), NULL, 0); | 949 | ARRAY_SIZE(ab3100_devs), NULL, 0, NULL); |
950 | 950 | ||
951 | ab3100_setup_debugfs(ab3100); | 951 | ab3100_setup_debugfs(ab3100); |
952 | 952 | ||
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 626b4ecaf647..47adf800024e 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
@@ -1418,25 +1418,25 @@ static int __devinit ab8500_probe(struct platform_device *pdev) | |||
1418 | 1418 | ||
1419 | ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs, | 1419 | ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs, |
1420 | ARRAY_SIZE(abx500_common_devs), NULL, | 1420 | ARRAY_SIZE(abx500_common_devs), NULL, |
1421 | ab8500->irq_base); | 1421 | ab8500->irq_base, ab8500->domain); |
1422 | if (ret) | 1422 | if (ret) |
1423 | goto out_freeirq; | 1423 | goto out_freeirq; |
1424 | 1424 | ||
1425 | if (is_ab9540(ab8500)) | 1425 | if (is_ab9540(ab8500)) |
1426 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs, | 1426 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs, |
1427 | ARRAY_SIZE(ab9540_devs), NULL, | 1427 | ARRAY_SIZE(ab9540_devs), NULL, |
1428 | ab8500->irq_base); | 1428 | ab8500->irq_base, ab8500->domain); |
1429 | else | 1429 | else |
1430 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs, | 1430 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs, |
1431 | ARRAY_SIZE(ab8500_devs), NULL, | 1431 | ARRAY_SIZE(ab8500_devs), NULL, |
1432 | ab8500->irq_base); | 1432 | ab8500->irq_base, ab8500->domain); |
1433 | if (ret) | 1433 | if (ret) |
1434 | goto out_freeirq; | 1434 | goto out_freeirq; |
1435 | 1435 | ||
1436 | if (is_ab9540(ab8500) || is_ab8505(ab8500)) | 1436 | if (is_ab9540(ab8500) || is_ab8505(ab8500)) |
1437 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs, | 1437 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs, |
1438 | ARRAY_SIZE(ab9540_ab8505_devs), NULL, | 1438 | ARRAY_SIZE(ab9540_ab8505_devs), NULL, |
1439 | ab8500->irq_base); | 1439 | ab8500->irq_base, ab8500->domain); |
1440 | if (ret) | 1440 | if (ret) |
1441 | goto out_freeirq; | 1441 | goto out_freeirq; |
1442 | 1442 | ||
@@ -1444,7 +1444,7 @@ static int __devinit ab8500_probe(struct platform_device *pdev) | |||
1444 | /* Add battery management devices */ | 1444 | /* Add battery management devices */ |
1445 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_bm_devs, | 1445 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_bm_devs, |
1446 | ARRAY_SIZE(ab8500_bm_devs), NULL, | 1446 | ARRAY_SIZE(ab8500_bm_devs), NULL, |
1447 | ab8500->irq_base); | 1447 | ab8500->irq_base, ab8500->domain); |
1448 | if (ret) | 1448 | if (ret) |
1449 | dev_err(ab8500->dev, "error adding bm devices\n"); | 1449 | dev_err(ab8500->dev, "error adding bm devices\n"); |
1450 | } | 1450 | } |
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index c7983e862549..1b48f2094806 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c | |||
@@ -316,7 +316,7 @@ int __devinit arizona_dev_init(struct arizona *arizona) | |||
316 | } | 316 | } |
317 | 317 | ||
318 | ret = mfd_add_devices(arizona->dev, -1, early_devs, | 318 | ret = mfd_add_devices(arizona->dev, -1, early_devs, |
319 | ARRAY_SIZE(early_devs), NULL, 0); | 319 | ARRAY_SIZE(early_devs), NULL, 0, NULL); |
320 | if (ret != 0) { | 320 | if (ret != 0) { |
321 | dev_err(dev, "Failed to add early children: %d\n", ret); | 321 | dev_err(dev, "Failed to add early children: %d\n", ret); |
322 | return ret; | 322 | return ret; |
@@ -516,11 +516,11 @@ int __devinit arizona_dev_init(struct arizona *arizona) | |||
516 | switch (arizona->type) { | 516 | switch (arizona->type) { |
517 | case WM5102: | 517 | case WM5102: |
518 | ret = mfd_add_devices(arizona->dev, -1, wm5102_devs, | 518 | ret = mfd_add_devices(arizona->dev, -1, wm5102_devs, |
519 | ARRAY_SIZE(wm5102_devs), NULL, 0); | 519 | ARRAY_SIZE(wm5102_devs), NULL, 0, NULL); |
520 | break; | 520 | break; |
521 | case WM5110: | 521 | case WM5110: |
522 | ret = mfd_add_devices(arizona->dev, -1, wm5110_devs, | 522 | ret = mfd_add_devices(arizona->dev, -1, wm5110_devs, |
523 | ARRAY_SIZE(wm5102_devs), NULL, 0); | 523 | ARRAY_SIZE(wm5102_devs), NULL, 0, NULL); |
524 | break; | 524 | break; |
525 | } | 525 | } |
526 | 526 | ||
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 683e18a23329..62f0883a7630 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -913,14 +913,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, | |||
913 | if (pdata->clock_rate) { | 913 | if (pdata->clock_rate) { |
914 | ds1wm_pdata.clock_rate = pdata->clock_rate; | 914 | ds1wm_pdata.clock_rate = pdata->clock_rate; |
915 | ret = mfd_add_devices(&pdev->dev, pdev->id, | 915 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
916 | &asic3_cell_ds1wm, 1, mem, asic->irq_base); | 916 | &asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL); |
917 | if (ret < 0) | 917 | if (ret < 0) |
918 | goto out; | 918 | goto out; |
919 | } | 919 | } |
920 | 920 | ||
921 | if (mem_sdio && (irq >= 0)) { | 921 | if (mem_sdio && (irq >= 0)) { |
922 | ret = mfd_add_devices(&pdev->dev, pdev->id, | 922 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
923 | &asic3_cell_mmc, 1, mem_sdio, irq); | 923 | &asic3_cell_mmc, 1, mem_sdio, irq, NULL); |
924 | if (ret < 0) | 924 | if (ret < 0) |
925 | goto out; | 925 | goto out; |
926 | } | 926 | } |
@@ -934,7 +934,7 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, | |||
934 | asic3_cell_leds[i].pdata_size = sizeof(pdata->leds[i]); | 934 | asic3_cell_leds[i].pdata_size = sizeof(pdata->leds[i]); |
935 | } | 935 | } |
936 | ret = mfd_add_devices(&pdev->dev, 0, | 936 | ret = mfd_add_devices(&pdev->dev, 0, |
937 | asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0); | 937 | asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL); |
938 | } | 938 | } |
939 | 939 | ||
940 | out: | 940 | out: |
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c index 3419e726de47..2b282133c725 100644 --- a/drivers/mfd/cs5535-mfd.c +++ b/drivers/mfd/cs5535-mfd.c | |||
@@ -149,7 +149,7 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev, | |||
149 | } | 149 | } |
150 | 150 | ||
151 | err = mfd_add_devices(&pdev->dev, -1, cs5535_mfd_cells, | 151 | err = mfd_add_devices(&pdev->dev, -1, cs5535_mfd_cells, |
152 | ARRAY_SIZE(cs5535_mfd_cells), NULL, 0); | 152 | ARRAY_SIZE(cs5535_mfd_cells), NULL, 0, NULL); |
153 | if (err) { | 153 | if (err) { |
154 | dev_err(&pdev->dev, "MFD add devices failed: %d\n", err); | 154 | dev_err(&pdev->dev, "MFD add devices failed: %d\n", err); |
155 | goto err_disable; | 155 | goto err_disable; |
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index 2544910e1fd6..a0a62b24621b 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c | |||
@@ -803,7 +803,7 @@ int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id) | |||
803 | dev_err(da9052->dev, "DA9052 ADC IRQ failed ret=%d\n", ret); | 803 | dev_err(da9052->dev, "DA9052 ADC IRQ failed ret=%d\n", ret); |
804 | 804 | ||
805 | ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info, | 805 | ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info, |
806 | ARRAY_SIZE(da9052_subdev_info), NULL, 0); | 806 | ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL); |
807 | if (ret) | 807 | if (ret) |
808 | goto err; | 808 | goto err; |
809 | 809 | ||
diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index 4e2af2cb2d26..45e83a68641b 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c | |||
@@ -129,7 +129,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev) | |||
129 | cell->pdata_size = sizeof(*davinci_vc); | 129 | cell->pdata_size = sizeof(*davinci_vc); |
130 | 130 | ||
131 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, | 131 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, |
132 | DAVINCI_VC_CELLS, NULL, 0); | 132 | DAVINCI_VC_CELLS, NULL, 0, NULL); |
133 | if (ret != 0) { | 133 | if (ret != 0) { |
134 | dev_err(&pdev->dev, "fail to register client devices\n"); | 134 | dev_err(&pdev->dev, "fail to register client devices\n"); |
135 | goto fail4; | 135 | goto fail4; |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 7040a0081130..0e63cdd9b52a 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
@@ -3010,7 +3010,7 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev) | |||
3010 | prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); | 3010 | prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); |
3011 | 3011 | ||
3012 | err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, | 3012 | err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, |
3013 | ARRAY_SIZE(db8500_prcmu_devs), NULL, 0); | 3013 | ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL); |
3014 | if (err) { | 3014 | if (err) { |
3015 | pr_err("prcmu: Failed to add subdevices\n"); | 3015 | pr_err("prcmu: Failed to add subdevices\n"); |
3016 | return err; | 3016 | return err; |
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index 04c7093d6499..9e5453d21a68 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c | |||
@@ -168,7 +168,7 @@ static int __init pasic3_probe(struct platform_device *pdev) | |||
168 | /* the first 5 PASIC3 registers control the DS1WM */ | 168 | /* the first 5 PASIC3 registers control the DS1WM */ |
169 | ds1wm_resources[0].end = (5 << asic->bus_shift) - 1; | 169 | ds1wm_resources[0].end = (5 << asic->bus_shift) - 1; |
170 | ret = mfd_add_devices(&pdev->dev, pdev->id, | 170 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
171 | &ds1wm_cell, 1, r, irq); | 171 | &ds1wm_cell, 1, r, irq, NULL); |
172 | if (ret < 0) | 172 | if (ret < 0) |
173 | dev_warn(dev, "failed to register DS1WM\n"); | 173 | dev_warn(dev, "failed to register DS1WM\n"); |
174 | } | 174 | } |
@@ -176,7 +176,8 @@ static int __init pasic3_probe(struct platform_device *pdev) | |||
176 | if (pdata && pdata->led_pdata) { | 176 | if (pdata && pdata->led_pdata) { |
177 | led_cell.platform_data = pdata->led_pdata; | 177 | led_cell.platform_data = pdata->led_pdata; |
178 | led_cell.pdata_size = sizeof(struct pasic3_leds_machinfo); | 178 | led_cell.pdata_size = sizeof(struct pasic3_leds_machinfo); |
179 | ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, 0); | 179 | ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, |
180 | 0, NULL); | ||
180 | if (ret < 0) | 181 | if (ret < 0) |
181 | dev_warn(dev, "failed to register LED device\n"); | 182 | dev_warn(dev, "failed to register LED device\n"); |
182 | } | 183 | } |
diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c index 59df5584cb58..266bdc5bd96d 100644 --- a/drivers/mfd/intel_msic.c +++ b/drivers/mfd/intel_msic.c | |||
@@ -344,13 +344,13 @@ static int __devinit intel_msic_init_devices(struct intel_msic *msic) | |||
344 | continue; | 344 | continue; |
345 | 345 | ||
346 | ret = mfd_add_devices(&pdev->dev, -1, &msic_devs[i], 1, NULL, | 346 | ret = mfd_add_devices(&pdev->dev, -1, &msic_devs[i], 1, NULL, |
347 | pdata->irq[i]); | 347 | pdata->irq[i], NULL); |
348 | if (ret) | 348 | if (ret) |
349 | goto fail; | 349 | goto fail; |
350 | } | 350 | } |
351 | 351 | ||
352 | ret = mfd_add_devices(&pdev->dev, 0, msic_other_devs, | 352 | ret = mfd_add_devices(&pdev->dev, 0, msic_other_devs, |
353 | ARRAY_SIZE(msic_other_devs), NULL, 0); | 353 | ARRAY_SIZE(msic_other_devs), NULL, 0, NULL); |
354 | if (ret) | 354 | if (ret) |
355 | goto fail; | 355 | goto fail; |
356 | 356 | ||
diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c index 2ea99989551a..965c4801df8a 100644 --- a/drivers/mfd/janz-cmodio.c +++ b/drivers/mfd/janz-cmodio.c | |||
@@ -147,7 +147,7 @@ static int __devinit cmodio_probe_submodules(struct cmodio_device *priv) | |||
147 | } | 147 | } |
148 | 148 | ||
149 | return mfd_add_devices(&pdev->dev, 0, priv->cells, | 149 | return mfd_add_devices(&pdev->dev, 0, priv->cells, |
150 | num_probed, NULL, pdev->irq); | 150 | num_probed, NULL, pdev->irq, NULL); |
151 | } | 151 | } |
152 | 152 | ||
153 | /* | 153 | /* |
diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c index 87662a17dec6..c6b6d7dda517 100644 --- a/drivers/mfd/jz4740-adc.c +++ b/drivers/mfd/jz4740-adc.c | |||
@@ -287,7 +287,8 @@ static int __devinit jz4740_adc_probe(struct platform_device *pdev) | |||
287 | writeb(0xff, adc->base + JZ_REG_ADC_CTRL); | 287 | writeb(0xff, adc->base + JZ_REG_ADC_CTRL); |
288 | 288 | ||
289 | ret = mfd_add_devices(&pdev->dev, 0, jz4740_adc_cells, | 289 | ret = mfd_add_devices(&pdev->dev, 0, jz4740_adc_cells, |
290 | ARRAY_SIZE(jz4740_adc_cells), mem_base, irq_base); | 290 | ARRAY_SIZE(jz4740_adc_cells), mem_base, |
291 | irq_base, NULL); | ||
291 | if (ret < 0) | 292 | if (ret < 0) |
292 | goto err_clk_put; | 293 | goto err_clk_put; |
293 | 294 | ||
diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c index 0b2879b87fd9..24212f45b201 100644 --- a/drivers/mfd/lm3533-core.c +++ b/drivers/mfd/lm3533-core.c | |||
@@ -393,7 +393,8 @@ static int __devinit lm3533_device_als_init(struct lm3533 *lm3533) | |||
393 | lm3533_als_devs[0].platform_data = pdata->als; | 393 | lm3533_als_devs[0].platform_data = pdata->als; |
394 | lm3533_als_devs[0].pdata_size = sizeof(*pdata->als); | 394 | lm3533_als_devs[0].pdata_size = sizeof(*pdata->als); |
395 | 395 | ||
396 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_als_devs, 1, NULL, 0); | 396 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_als_devs, 1, NULL, |
397 | 0, NULL); | ||
397 | if (ret) { | 398 | if (ret) { |
398 | dev_err(lm3533->dev, "failed to add ALS device\n"); | 399 | dev_err(lm3533->dev, "failed to add ALS device\n"); |
399 | return ret; | 400 | return ret; |
@@ -422,7 +423,7 @@ static int __devinit lm3533_device_bl_init(struct lm3533 *lm3533) | |||
422 | } | 423 | } |
423 | 424 | ||
424 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_bl_devs, | 425 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_bl_devs, |
425 | pdata->num_backlights, NULL, 0); | 426 | pdata->num_backlights, NULL, 0, NULL); |
426 | if (ret) { | 427 | if (ret) { |
427 | dev_err(lm3533->dev, "failed to add backlight devices\n"); | 428 | dev_err(lm3533->dev, "failed to add backlight devices\n"); |
428 | return ret; | 429 | return ret; |
@@ -451,7 +452,7 @@ static int __devinit lm3533_device_led_init(struct lm3533 *lm3533) | |||
451 | } | 452 | } |
452 | 453 | ||
453 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_led_devs, | 454 | ret = mfd_add_devices(lm3533->dev, 0, lm3533_led_devs, |
454 | pdata->num_leds, NULL, 0); | 455 | pdata->num_leds, NULL, 0, NULL); |
455 | if (ret) { | 456 | if (ret) { |
456 | dev_err(lm3533->dev, "failed to add LED devices\n"); | 457 | dev_err(lm3533->dev, "failed to add LED devices\n"); |
457 | return ret; | 458 | return ret; |
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c index a05fdfc2ebcf..092ad4b44b6d 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c | |||
@@ -750,7 +750,7 @@ gpe0_done: | |||
750 | 750 | ||
751 | lpc_ich_finalize_cell(&lpc_ich_cells[LPC_GPIO], id); | 751 | lpc_ich_finalize_cell(&lpc_ich_cells[LPC_GPIO], id); |
752 | ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_GPIO], | 752 | ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_GPIO], |
753 | 1, NULL, 0); | 753 | 1, NULL, 0, NULL); |
754 | 754 | ||
755 | gpio_done: | 755 | gpio_done: |
756 | if (acpi_conflict) | 756 | if (acpi_conflict) |
@@ -807,7 +807,7 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev, | |||
807 | 807 | ||
808 | lpc_ich_finalize_cell(&lpc_ich_cells[LPC_WDT], id); | 808 | lpc_ich_finalize_cell(&lpc_ich_cells[LPC_WDT], id); |
809 | ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_WDT], | 809 | ret = mfd_add_devices(&dev->dev, -1, &lpc_ich_cells[LPC_WDT], |
810 | 1, NULL, 0); | 810 | 1, NULL, 0, NULL); |
811 | 811 | ||
812 | wdt_done: | 812 | wdt_done: |
813 | return ret; | 813 | return ret; |
diff --git a/drivers/mfd/lpc_sch.c b/drivers/mfd/lpc_sch.c index 9f20abc5e393..f6b9c5c96b24 100644 --- a/drivers/mfd/lpc_sch.c +++ b/drivers/mfd/lpc_sch.c | |||
@@ -127,7 +127,8 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev, | |||
127 | lpc_sch_cells[i].id = id->device; | 127 | lpc_sch_cells[i].id = id->device; |
128 | 128 | ||
129 | ret = mfd_add_devices(&dev->dev, 0, | 129 | ret = mfd_add_devices(&dev->dev, 0, |
130 | lpc_sch_cells, ARRAY_SIZE(lpc_sch_cells), NULL, 0); | 130 | lpc_sch_cells, ARRAY_SIZE(lpc_sch_cells), NULL, |
131 | 0, NULL); | ||
131 | if (ret) | 132 | if (ret) |
132 | goto out_dev; | 133 | goto out_dev; |
133 | 134 | ||
@@ -153,7 +154,8 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev, | |||
153 | tunnelcreek_cells[i].id = id->device; | 154 | tunnelcreek_cells[i].id = id->device; |
154 | 155 | ||
155 | ret = mfd_add_devices(&dev->dev, 0, tunnelcreek_cells, | 156 | ret = mfd_add_devices(&dev->dev, 0, tunnelcreek_cells, |
156 | ARRAY_SIZE(tunnelcreek_cells), NULL, 0); | 157 | ARRAY_SIZE(tunnelcreek_cells), NULL, |
158 | 0, NULL); | ||
157 | } | 159 | } |
158 | 160 | ||
159 | return ret; | 161 | return ret; |
diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index c03e12b51924..d9e24c849a00 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c | |||
@@ -126,7 +126,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
126 | max77686_irq_init(max77686); | 126 | max77686_irq_init(max77686); |
127 | 127 | ||
128 | ret = mfd_add_devices(max77686->dev, -1, max77686_devs, | 128 | ret = mfd_add_devices(max77686->dev, -1, max77686_devs, |
129 | ARRAY_SIZE(max77686_devs), NULL, 0); | 129 | ARRAY_SIZE(max77686_devs), NULL, 0, NULL); |
130 | 130 | ||
131 | if (ret < 0) | 131 | if (ret < 0) |
132 | goto err_mfd; | 132 | goto err_mfd; |
diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c index a1811cb50ec7..4fdd03d28539 100644 --- a/drivers/mfd/max77693.c +++ b/drivers/mfd/max77693.c | |||
@@ -159,7 +159,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c, | |||
159 | pm_runtime_set_active(max77693->dev); | 159 | pm_runtime_set_active(max77693->dev); |
160 | 160 | ||
161 | ret = mfd_add_devices(max77693->dev, -1, max77693_devs, | 161 | ret = mfd_add_devices(max77693->dev, -1, max77693_devs, |
162 | ARRAY_SIZE(max77693_devs), NULL, 0); | 162 | ARRAY_SIZE(max77693_devs), NULL, 0, NULL); |
163 | if (ret < 0) | 163 | if (ret < 0) |
164 | goto err_mfd; | 164 | goto err_mfd; |
165 | 165 | ||
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 08a57231c25b..f2ff31f3a2f0 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c | |||
@@ -598,7 +598,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
598 | 598 | ||
599 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], | 599 | ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], |
600 | ARRAY_SIZE(rtc_devs), | 600 | ARRAY_SIZE(rtc_devs), |
601 | &rtc_resources[0], chip->irq_base); | 601 | &rtc_resources[0], chip->irq_base, NULL); |
602 | if (ret < 0) { | 602 | if (ret < 0) { |
603 | dev_err(chip->dev, "Failed to add rtc subdev\n"); | 603 | dev_err(chip->dev, "Failed to add rtc subdev\n"); |
604 | goto out; | 604 | goto out; |
@@ -606,7 +606,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
606 | 606 | ||
607 | ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], | 607 | ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], |
608 | ARRAY_SIZE(onkey_devs), | 608 | ARRAY_SIZE(onkey_devs), |
609 | &onkey_resources[0], 0); | 609 | &onkey_resources[0], 0, NULL); |
610 | if (ret < 0) { | 610 | if (ret < 0) { |
611 | dev_err(chip->dev, "Failed to add onkey subdev\n"); | 611 | dev_err(chip->dev, "Failed to add onkey subdev\n"); |
612 | goto out_dev; | 612 | goto out_dev; |
@@ -615,7 +615,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
615 | if (pdata) { | 615 | if (pdata) { |
616 | ret = mfd_add_devices(chip->dev, 0, ®ulator_devs[0], | 616 | ret = mfd_add_devices(chip->dev, 0, ®ulator_devs[0], |
617 | ARRAY_SIZE(regulator_devs), | 617 | ARRAY_SIZE(regulator_devs), |
618 | ®ulator_resources[0], 0); | 618 | ®ulator_resources[0], 0, NULL); |
619 | if (ret < 0) { | 619 | if (ret < 0) { |
620 | dev_err(chip->dev, "Failed to add regulator subdev\n"); | 620 | dev_err(chip->dev, "Failed to add regulator subdev\n"); |
621 | goto out_dev; | 621 | goto out_dev; |
@@ -625,7 +625,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
625 | if (pdata && pdata->backlight) { | 625 | if (pdata && pdata->backlight) { |
626 | ret = mfd_add_devices(chip->dev, 0, &backlight_devs[0], | 626 | ret = mfd_add_devices(chip->dev, 0, &backlight_devs[0], |
627 | ARRAY_SIZE(backlight_devs), | 627 | ARRAY_SIZE(backlight_devs), |
628 | &backlight_resources[0], 0); | 628 | &backlight_resources[0], 0, NULL); |
629 | if (ret < 0) { | 629 | if (ret < 0) { |
630 | dev_err(chip->dev, "Failed to add backlight subdev\n"); | 630 | dev_err(chip->dev, "Failed to add backlight subdev\n"); |
631 | goto out_dev; | 631 | goto out_dev; |
@@ -635,7 +635,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
635 | if (pdata && pdata->power) { | 635 | if (pdata && pdata->power) { |
636 | ret = mfd_add_devices(chip->dev, 0, &power_devs[0], | 636 | ret = mfd_add_devices(chip->dev, 0, &power_devs[0], |
637 | ARRAY_SIZE(power_devs), | 637 | ARRAY_SIZE(power_devs), |
638 | &power_supply_resources[0], 0); | 638 | &power_supply_resources[0], 0, NULL); |
639 | if (ret < 0) { | 639 | if (ret < 0) { |
640 | dev_err(chip->dev, "Failed to add power supply " | 640 | dev_err(chip->dev, "Failed to add power supply " |
641 | "subdev\n"); | 641 | "subdev\n"); |
@@ -646,7 +646,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip, | |||
646 | if (pdata && pdata->touch) { | 646 | if (pdata && pdata->touch) { |
647 | ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], | 647 | ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], |
648 | ARRAY_SIZE(touch_devs), | 648 | ARRAY_SIZE(touch_devs), |
649 | &touch_resources[0], 0); | 649 | &touch_resources[0], 0, NULL); |
650 | if (ret < 0) { | 650 | if (ret < 0) { |
651 | dev_err(chip->dev, "Failed to add touch subdev\n"); | 651 | dev_err(chip->dev, "Failed to add touch subdev\n"); |
652 | goto out_dev; | 652 | goto out_dev; |
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 10b629c245b6..f123517065ec 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c | |||
@@ -160,7 +160,7 @@ static int max8997_i2c_probe(struct i2c_client *i2c, | |||
160 | 160 | ||
161 | mfd_add_devices(max8997->dev, -1, max8997_devs, | 161 | mfd_add_devices(max8997->dev, -1, max8997_devs, |
162 | ARRAY_SIZE(max8997_devs), | 162 | ARRAY_SIZE(max8997_devs), |
163 | NULL, 0); | 163 | NULL, 0, NULL); |
164 | 164 | ||
165 | /* | 165 | /* |
166 | * TODO: enable others (flash, muic, rtc, battery, ...) and | 166 | * TODO: enable others (flash, muic, rtc, battery, ...) and |
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 6ef56d28c056..d7218cc90945 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c | |||
@@ -161,13 +161,13 @@ static int max8998_i2c_probe(struct i2c_client *i2c, | |||
161 | switch (id->driver_data) { | 161 | switch (id->driver_data) { |
162 | case TYPE_LP3974: | 162 | case TYPE_LP3974: |
163 | ret = mfd_add_devices(max8998->dev, -1, | 163 | ret = mfd_add_devices(max8998->dev, -1, |
164 | lp3974_devs, ARRAY_SIZE(lp3974_devs), | 164 | lp3974_devs, ARRAY_SIZE(lp3974_devs), |
165 | NULL, 0); | 165 | NULL, 0, NULL); |
166 | break; | 166 | break; |
167 | case TYPE_MAX8998: | 167 | case TYPE_MAX8998: |
168 | ret = mfd_add_devices(max8998->dev, -1, | 168 | ret = mfd_add_devices(max8998->dev, -1, |
169 | max8998_devs, ARRAY_SIZE(max8998_devs), | 169 | max8998_devs, ARRAY_SIZE(max8998_devs), |
170 | NULL, 0); | 170 | NULL, 0, NULL); |
171 | break; | 171 | break; |
172 | default: | 172 | default: |
173 | ret = -EINVAL; | 173 | ret = -EINVAL; |
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index b801dc72f041..1ec79b54bd2f 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c | |||
@@ -612,7 +612,7 @@ static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx, | |||
612 | if (!cell.name) | 612 | if (!cell.name) |
613 | return -ENOMEM; | 613 | return -ENOMEM; |
614 | 614 | ||
615 | return mfd_add_devices(mc13xxx->dev, -1, &cell, 1, NULL, 0); | 615 | return mfd_add_devices(mc13xxx->dev, -1, &cell, 1, NULL, 0, NULL); |
616 | } | 616 | } |
617 | 617 | ||
618 | static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format) | 618 | static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format) |
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0c3a01cde2f7..f8b77711ad2d 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c | |||
@@ -74,12 +74,11 @@ static int mfd_platform_add_cell(struct platform_device *pdev, | |||
74 | static int mfd_add_device(struct device *parent, int id, | 74 | static int mfd_add_device(struct device *parent, int id, |
75 | const struct mfd_cell *cell, | 75 | const struct mfd_cell *cell, |
76 | struct resource *mem_base, | 76 | struct resource *mem_base, |
77 | int irq_base) | 77 | int irq_base, struct irq_domain *domain) |
78 | { | 78 | { |
79 | struct resource *res; | 79 | struct resource *res; |
80 | struct platform_device *pdev; | 80 | struct platform_device *pdev; |
81 | struct device_node *np = NULL; | 81 | struct device_node *np = NULL; |
82 | struct irq_domain *domain = NULL; | ||
83 | int ret = -ENOMEM; | 82 | int ret = -ENOMEM; |
84 | int r; | 83 | int r; |
85 | 84 | ||
@@ -97,7 +96,6 @@ static int mfd_add_device(struct device *parent, int id, | |||
97 | for_each_child_of_node(parent->of_node, np) { | 96 | for_each_child_of_node(parent->of_node, np) { |
98 | if (of_device_is_compatible(np, cell->of_compatible)) { | 97 | if (of_device_is_compatible(np, cell->of_compatible)) { |
99 | pdev->dev.of_node = np; | 98 | pdev->dev.of_node = np; |
100 | domain = irq_find_host(parent->of_node); | ||
101 | break; | 99 | break; |
102 | } | 100 | } |
103 | } | 101 | } |
@@ -177,7 +175,7 @@ fail_alloc: | |||
177 | int mfd_add_devices(struct device *parent, int id, | 175 | int mfd_add_devices(struct device *parent, int id, |
178 | struct mfd_cell *cells, int n_devs, | 176 | struct mfd_cell *cells, int n_devs, |
179 | struct resource *mem_base, | 177 | struct resource *mem_base, |
180 | int irq_base) | 178 | int irq_base, struct irq_domain *domain) |
181 | { | 179 | { |
182 | int i; | 180 | int i; |
183 | int ret = 0; | 181 | int ret = 0; |
@@ -191,7 +189,8 @@ int mfd_add_devices(struct device *parent, int id, | |||
191 | for (i = 0; i < n_devs; i++) { | 189 | for (i = 0; i < n_devs; i++) { |
192 | atomic_set(&cnts[i], 0); | 190 | atomic_set(&cnts[i], 0); |
193 | cells[i].usage_count = &cnts[i]; | 191 | cells[i].usage_count = &cnts[i]; |
194 | ret = mfd_add_device(parent, id, cells + i, mem_base, irq_base); | 192 | ret = mfd_add_device(parent, id, cells + i, mem_base, |
193 | irq_base, domain); | ||
195 | if (ret) | 194 | if (ret) |
196 | break; | 195 | break; |
197 | } | 196 | } |
@@ -247,7 +246,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones) | |||
247 | for (i = 0; i < n_clones; i++) { | 246 | for (i = 0; i < n_clones; i++) { |
248 | cell_entry.name = clones[i]; | 247 | cell_entry.name = clones[i]; |
249 | /* don't give up if a single call fails; just report error */ | 248 | /* don't give up if a single call fails; just report error */ |
250 | if (mfd_add_device(pdev->dev.parent, -1, &cell_entry, NULL, 0)) | 249 | if (mfd_add_device(pdev->dev.parent, -1, &cell_entry, NULL, 0, |
250 | NULL)) | ||
251 | dev_err(dev, "failed to create platform device '%s'\n", | 251 | dev_err(dev, "failed to create platform device '%s'\n", |
252 | clones[i]); | 252 | clones[i]); |
253 | } | 253 | } |
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index c4a69f193a1d..a345f9bb7b47 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c | |||
@@ -453,7 +453,8 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c, | |||
453 | 453 | ||
454 | ret = mfd_add_devices(palmas->dev, -1, | 454 | ret = mfd_add_devices(palmas->dev, -1, |
455 | children, ARRAY_SIZE(palmas_children), | 455 | children, ARRAY_SIZE(palmas_children), |
456 | NULL, regmap_irq_chip_get_base(palmas->irq_data)); | 456 | NULL, regmap_irq_chip_get_base(palmas->irq_data), |
457 | NULL); | ||
457 | kfree(children); | 458 | kfree(children); |
458 | 459 | ||
459 | if (ret < 0) | 460 | if (ret < 0) |
diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c index cdc1df7fa0e9..3a8fa88567b1 100644 --- a/drivers/mfd/rc5t583.c +++ b/drivers/mfd/rc5t583.c | |||
@@ -289,7 +289,7 @@ static int __devinit rc5t583_i2c_probe(struct i2c_client *i2c, | |||
289 | } | 289 | } |
290 | 290 | ||
291 | ret = mfd_add_devices(rc5t583->dev, -1, rc5t583_subdevs, | 291 | ret = mfd_add_devices(rc5t583->dev, -1, rc5t583_subdevs, |
292 | ARRAY_SIZE(rc5t583_subdevs), NULL, 0); | 292 | ARRAY_SIZE(rc5t583_subdevs), NULL, 0, NULL); |
293 | if (ret) { | 293 | if (ret) { |
294 | dev_err(&i2c->dev, "add mfd devices failed: %d\n", ret); | 294 | dev_err(&i2c->dev, "add mfd devices failed: %d\n", ret); |
295 | goto err_add_devs; | 295 | goto err_add_devs; |
diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c index 685d61e431ad..0f70dce61160 100644 --- a/drivers/mfd/rdc321x-southbridge.c +++ b/drivers/mfd/rdc321x-southbridge.c | |||
@@ -87,7 +87,8 @@ static int __devinit rdc321x_sb_probe(struct pci_dev *pdev, | |||
87 | rdc321x_wdt_pdata.sb_pdev = pdev; | 87 | rdc321x_wdt_pdata.sb_pdev = pdev; |
88 | 88 | ||
89 | return mfd_add_devices(&pdev->dev, -1, | 89 | return mfd_add_devices(&pdev->dev, -1, |
90 | rdc321x_sb_cells, ARRAY_SIZE(rdc321x_sb_cells), NULL, 0); | 90 | rdc321x_sb_cells, ARRAY_SIZE(rdc321x_sb_cells), |
91 | NULL, 0, NULL); | ||
91 | } | 92 | } |
92 | 93 | ||
93 | static void __devexit rdc321x_sb_remove(struct pci_dev *pdev) | 94 | static void __devexit rdc321x_sb_remove(struct pci_dev *pdev) |
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 2988efde11eb..49d361a618d0 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -141,19 +141,19 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
141 | switch (sec_pmic->device_type) { | 141 | switch (sec_pmic->device_type) { |
142 | case S5M8751X: | 142 | case S5M8751X: |
143 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8751_devs, | 143 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8751_devs, |
144 | ARRAY_SIZE(s5m8751_devs), NULL, 0); | 144 | ARRAY_SIZE(s5m8751_devs), NULL, 0, NULL); |
145 | break; | 145 | break; |
146 | case S5M8763X: | 146 | case S5M8763X: |
147 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8763_devs, | 147 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8763_devs, |
148 | ARRAY_SIZE(s5m8763_devs), NULL, 0); | 148 | ARRAY_SIZE(s5m8763_devs), NULL, 0, NULL); |
149 | break; | 149 | break; |
150 | case S5M8767X: | 150 | case S5M8767X: |
151 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8767_devs, | 151 | ret = mfd_add_devices(sec_pmic->dev, -1, s5m8767_devs, |
152 | ARRAY_SIZE(s5m8767_devs), NULL, 0); | 152 | ARRAY_SIZE(s5m8767_devs), NULL, 0, NULL); |
153 | break; | 153 | break; |
154 | case S2MPS11X: | 154 | case S2MPS11X: |
155 | ret = mfd_add_devices(sec_pmic->dev, -1, s2mps11_devs, | 155 | ret = mfd_add_devices(sec_pmic->dev, -1, s2mps11_devs, |
156 | ARRAY_SIZE(s2mps11_devs), NULL, 0); | 156 | ARRAY_SIZE(s2mps11_devs), NULL, 0, NULL); |
157 | break; | 157 | break; |
158 | default: | 158 | default: |
159 | /* If this happens the probe function is problem */ | 159 | /* If this happens the probe function is problem */ |
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index d31fed07aefb..d35da6820bea 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c | |||
@@ -407,7 +407,7 @@ static int __devinit sta2x11_mfd_probe(struct pci_dev *pdev, | |||
407 | sta2x11_mfd_bar0, | 407 | sta2x11_mfd_bar0, |
408 | ARRAY_SIZE(sta2x11_mfd_bar0), | 408 | ARRAY_SIZE(sta2x11_mfd_bar0), |
409 | &pdev->resource[0], | 409 | &pdev->resource[0], |
410 | 0); | 410 | 0, NULL); |
411 | if (err) { | 411 | if (err) { |
412 | dev_err(&pdev->dev, "mfd_add_devices[0] failed: %d\n", err); | 412 | dev_err(&pdev->dev, "mfd_add_devices[0] failed: %d\n", err); |
413 | goto err_disable; | 413 | goto err_disable; |
@@ -417,7 +417,7 @@ static int __devinit sta2x11_mfd_probe(struct pci_dev *pdev, | |||
417 | sta2x11_mfd_bar1, | 417 | sta2x11_mfd_bar1, |
418 | ARRAY_SIZE(sta2x11_mfd_bar1), | 418 | ARRAY_SIZE(sta2x11_mfd_bar1), |
419 | &pdev->resource[1], | 419 | &pdev->resource[1], |
420 | 0); | 420 | 0, NULL); |
421 | if (err) { | 421 | if (err) { |
422 | dev_err(&pdev->dev, "mfd_add_devices[1] failed: %d\n", err); | 422 | dev_err(&pdev->dev, "mfd_add_devices[1] failed: %d\n", err); |
423 | goto err_disable; | 423 | goto err_disable; |
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 2dd8d49cb30b..c94f521f392c 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c | |||
@@ -962,7 +962,7 @@ static int __devinit stmpe_add_device(struct stmpe *stmpe, | |||
962 | struct mfd_cell *cell, int irq) | 962 | struct mfd_cell *cell, int irq) |
963 | { | 963 | { |
964 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, | 964 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, |
965 | NULL, stmpe->irq_base + irq); | 965 | NULL, stmpe->irq_base + irq, NULL); |
966 | } | 966 | } |
967 | 967 | ||
968 | static int __devinit stmpe_devices_init(struct stmpe *stmpe) | 968 | static int __devinit stmpe_devices_init(struct stmpe *stmpe) |
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index 2d9e8799e733..b32940ec9034 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c | |||
@@ -388,7 +388,7 @@ static int t7l66xb_probe(struct platform_device *dev) | |||
388 | 388 | ||
389 | ret = mfd_add_devices(&dev->dev, dev->id, | 389 | ret = mfd_add_devices(&dev->dev, dev->id, |
390 | t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells), | 390 | t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells), |
391 | iomem, t7l66xb->irq_base); | 391 | iomem, t7l66xb->irq_base, NULL); |
392 | 392 | ||
393 | if (!ret) | 393 | if (!ret) |
394 | return 0; | 394 | return 0; |
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 048bf0532a09..b56ba6b43294 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c | |||
@@ -262,8 +262,8 @@ static int __devinit tc3589x_device_init(struct tc3589x *tc3589x) | |||
262 | 262 | ||
263 | if (blocks & TC3589x_BLOCK_GPIO) { | 263 | if (blocks & TC3589x_BLOCK_GPIO) { |
264 | ret = mfd_add_devices(tc3589x->dev, -1, tc3589x_dev_gpio, | 264 | ret = mfd_add_devices(tc3589x->dev, -1, tc3589x_dev_gpio, |
265 | ARRAY_SIZE(tc3589x_dev_gpio), NULL, | 265 | ARRAY_SIZE(tc3589x_dev_gpio), NULL, |
266 | tc3589x->irq_base); | 266 | tc3589x->irq_base, NULL); |
267 | if (ret) { | 267 | if (ret) { |
268 | dev_err(tc3589x->dev, "failed to add gpio child\n"); | 268 | dev_err(tc3589x->dev, "failed to add gpio child\n"); |
269 | return ret; | 269 | return ret; |
@@ -273,8 +273,8 @@ static int __devinit tc3589x_device_init(struct tc3589x *tc3589x) | |||
273 | 273 | ||
274 | if (blocks & TC3589x_BLOCK_KEYPAD) { | 274 | if (blocks & TC3589x_BLOCK_KEYPAD) { |
275 | ret = mfd_add_devices(tc3589x->dev, -1, tc3589x_dev_keypad, | 275 | ret = mfd_add_devices(tc3589x->dev, -1, tc3589x_dev_keypad, |
276 | ARRAY_SIZE(tc3589x_dev_keypad), NULL, | 276 | ARRAY_SIZE(tc3589x_dev_keypad), NULL, |
277 | tc3589x->irq_base); | 277 | tc3589x->irq_base, NULL); |
278 | if (ret) { | 278 | if (ret) { |
279 | dev_err(tc3589x->dev, "failed to keypad child\n"); | 279 | dev_err(tc3589x->dev, "failed to keypad child\n"); |
280 | return ret; | 280 | return ret; |
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index d20a284ad4ba..413c891102f8 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c | |||
@@ -192,7 +192,7 @@ static int __devinit tc6387xb_probe(struct platform_device *dev) | |||
192 | printk(KERN_INFO "Toshiba tc6387xb initialised\n"); | 192 | printk(KERN_INFO "Toshiba tc6387xb initialised\n"); |
193 | 193 | ||
194 | ret = mfd_add_devices(&dev->dev, dev->id, tc6387xb_cells, | 194 | ret = mfd_add_devices(&dev->dev, dev->id, tc6387xb_cells, |
195 | ARRAY_SIZE(tc6387xb_cells), iomem, irq); | 195 | ARRAY_SIZE(tc6387xb_cells), iomem, irq, NULL); |
196 | 196 | ||
197 | if (!ret) | 197 | if (!ret) |
198 | return 0; | 198 | return 0; |
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index 9612264f0e6d..dcab026fcbb2 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -700,8 +700,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) | |||
700 | tc6393xb_cells[TC6393XB_CELL_FB].pdata_size = sizeof(*tcpd->fb_data); | 700 | tc6393xb_cells[TC6393XB_CELL_FB].pdata_size = sizeof(*tcpd->fb_data); |
701 | 701 | ||
702 | ret = mfd_add_devices(&dev->dev, dev->id, | 702 | ret = mfd_add_devices(&dev->dev, dev->id, |
703 | tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells), | 703 | tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells), |
704 | iomem, tcpd->irq_base); | 704 | iomem, tcpd->irq_base, NULL); |
705 | 705 | ||
706 | if (!ret) | 706 | if (!ret) |
707 | return 0; | 707 | return 0; |
diff --git a/drivers/mfd/ti-ssp.c b/drivers/mfd/ti-ssp.c index 4fb0e6c8e8fe..7c3675a74f93 100644 --- a/drivers/mfd/ti-ssp.c +++ b/drivers/mfd/ti-ssp.c | |||
@@ -412,7 +412,7 @@ static int __devinit ti_ssp_probe(struct platform_device *pdev) | |||
412 | cells[id].data_size = data->pdata_size; | 412 | cells[id].data_size = data->pdata_size; |
413 | } | 413 | } |
414 | 414 | ||
415 | error = mfd_add_devices(dev, 0, cells, 2, NULL, 0); | 415 | error = mfd_add_devices(dev, 0, cells, 2, NULL, 0, NULL); |
416 | if (error < 0) { | 416 | if (error < 0) { |
417 | dev_err(dev, "cannot add mfd cells\n"); | 417 | dev_err(dev, "cannot add mfd cells\n"); |
418 | goto error_enable; | 418 | goto error_enable; |
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index a447f4ec11fb..cccc626c83c8 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c | |||
@@ -757,25 +757,25 @@ static int __devinit timb_probe(struct pci_dev *dev, | |||
757 | err = mfd_add_devices(&dev->dev, -1, | 757 | err = mfd_add_devices(&dev->dev, -1, |
758 | timberdale_cells_bar0_cfg0, | 758 | timberdale_cells_bar0_cfg0, |
759 | ARRAY_SIZE(timberdale_cells_bar0_cfg0), | 759 | ARRAY_SIZE(timberdale_cells_bar0_cfg0), |
760 | &dev->resource[0], msix_entries[0].vector); | 760 | &dev->resource[0], msix_entries[0].vector, NULL); |
761 | break; | 761 | break; |
762 | case TIMB_HW_VER1: | 762 | case TIMB_HW_VER1: |
763 | err = mfd_add_devices(&dev->dev, -1, | 763 | err = mfd_add_devices(&dev->dev, -1, |
764 | timberdale_cells_bar0_cfg1, | 764 | timberdale_cells_bar0_cfg1, |
765 | ARRAY_SIZE(timberdale_cells_bar0_cfg1), | 765 | ARRAY_SIZE(timberdale_cells_bar0_cfg1), |
766 | &dev->resource[0], msix_entries[0].vector); | 766 | &dev->resource[0], msix_entries[0].vector, NULL); |
767 | break; | 767 | break; |
768 | case TIMB_HW_VER2: | 768 | case TIMB_HW_VER2: |
769 | err = mfd_add_devices(&dev->dev, -1, | 769 | err = mfd_add_devices(&dev->dev, -1, |
770 | timberdale_cells_bar0_cfg2, | 770 | timberdale_cells_bar0_cfg2, |
771 | ARRAY_SIZE(timberdale_cells_bar0_cfg2), | 771 | ARRAY_SIZE(timberdale_cells_bar0_cfg2), |
772 | &dev->resource[0], msix_entries[0].vector); | 772 | &dev->resource[0], msix_entries[0].vector, NULL); |
773 | break; | 773 | break; |
774 | case TIMB_HW_VER3: | 774 | case TIMB_HW_VER3: |
775 | err = mfd_add_devices(&dev->dev, -1, | 775 | err = mfd_add_devices(&dev->dev, -1, |
776 | timberdale_cells_bar0_cfg3, | 776 | timberdale_cells_bar0_cfg3, |
777 | ARRAY_SIZE(timberdale_cells_bar0_cfg3), | 777 | ARRAY_SIZE(timberdale_cells_bar0_cfg3), |
778 | &dev->resource[0], msix_entries[0].vector); | 778 | &dev->resource[0], msix_entries[0].vector, NULL); |
779 | break; | 779 | break; |
780 | default: | 780 | default: |
781 | dev_err(&dev->dev, "Uknown IP setup: %d.%d.%d\n", | 781 | dev_err(&dev->dev, "Uknown IP setup: %d.%d.%d\n", |
@@ -792,7 +792,7 @@ static int __devinit timb_probe(struct pci_dev *dev, | |||
792 | 792 | ||
793 | err = mfd_add_devices(&dev->dev, 0, | 793 | err = mfd_add_devices(&dev->dev, 0, |
794 | timberdale_cells_bar1, ARRAY_SIZE(timberdale_cells_bar1), | 794 | timberdale_cells_bar1, ARRAY_SIZE(timberdale_cells_bar1), |
795 | &dev->resource[1], msix_entries[0].vector); | 795 | &dev->resource[1], msix_entries[0].vector, NULL); |
796 | if (err) { | 796 | if (err) { |
797 | dev_err(&dev->dev, "mfd_add_devices failed: %d\n", err); | 797 | dev_err(&dev->dev, "mfd_add_devices failed: %d\n", err); |
798 | goto err_mfd2; | 798 | goto err_mfd2; |
@@ -803,7 +803,7 @@ static int __devinit timb_probe(struct pci_dev *dev, | |||
803 | ((priv->fw.config & TIMB_HW_VER_MASK) == TIMB_HW_VER3)) { | 803 | ((priv->fw.config & TIMB_HW_VER_MASK) == TIMB_HW_VER3)) { |
804 | err = mfd_add_devices(&dev->dev, 1, timberdale_cells_bar2, | 804 | err = mfd_add_devices(&dev->dev, 1, timberdale_cells_bar2, |
805 | ARRAY_SIZE(timberdale_cells_bar2), | 805 | ARRAY_SIZE(timberdale_cells_bar2), |
806 | &dev->resource[2], msix_entries[0].vector); | 806 | &dev->resource[2], msix_entries[0].vector, NULL); |
807 | if (err) { | 807 | if (err) { |
808 | dev_err(&dev->dev, "mfd_add_devices failed: %d\n", err); | 808 | dev_err(&dev->dev, "mfd_add_devices failed: %d\n", err); |
809 | goto err_mfd2; | 809 | goto err_mfd2; |
diff --git a/drivers/mfd/tps6105x.c b/drivers/mfd/tps6105x.c index a293b978e27c..14051bdc714b 100644 --- a/drivers/mfd/tps6105x.c +++ b/drivers/mfd/tps6105x.c | |||
@@ -188,7 +188,7 @@ static int __devinit tps6105x_probe(struct i2c_client *client, | |||
188 | } | 188 | } |
189 | 189 | ||
190 | ret = mfd_add_devices(&client->dev, 0, tps6105x_cells, | 190 | ret = mfd_add_devices(&client->dev, 0, tps6105x_cells, |
191 | ARRAY_SIZE(tps6105x_cells), NULL, 0); | 191 | ARRAY_SIZE(tps6105x_cells), NULL, 0, NULL); |
192 | if (ret) | 192 | if (ret) |
193 | goto fail; | 193 | goto fail; |
194 | 194 | ||
diff --git a/drivers/mfd/tps6507x.c b/drivers/mfd/tps6507x.c index 33ba7723c967..1b203499c744 100644 --- a/drivers/mfd/tps6507x.c +++ b/drivers/mfd/tps6507x.c | |||
@@ -100,7 +100,7 @@ static int tps6507x_i2c_probe(struct i2c_client *i2c, | |||
100 | 100 | ||
101 | ret = mfd_add_devices(tps6507x->dev, -1, | 101 | ret = mfd_add_devices(tps6507x->dev, -1, |
102 | tps6507x_devs, ARRAY_SIZE(tps6507x_devs), | 102 | tps6507x_devs, ARRAY_SIZE(tps6507x_devs), |
103 | NULL, 0); | 103 | NULL, 0, NULL); |
104 | 104 | ||
105 | if (ret < 0) | 105 | if (ret < 0) |
106 | goto err; | 106 | goto err; |
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index 80e24f4b47bf..50fd87c87a1c 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c | |||
@@ -292,7 +292,7 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client, | |||
292 | } | 292 | } |
293 | 293 | ||
294 | ret = mfd_add_devices(tps65090->dev, -1, tps65090s, | 294 | ret = mfd_add_devices(tps65090->dev, -1, tps65090s, |
295 | ARRAY_SIZE(tps65090s), NULL, 0); | 295 | ARRAY_SIZE(tps65090s), NULL, 0, NULL); |
296 | if (ret) { | 296 | if (ret) { |
297 | dev_err(&client->dev, "add mfd devices failed with err: %d\n", | 297 | dev_err(&client->dev, "add mfd devices failed with err: %d\n", |
298 | ret); | 298 | ret); |
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 3bc274409b58..a95e9421b735 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c | |||
@@ -191,7 +191,7 @@ static int __devinit tps65217_probe(struct i2c_client *client, | |||
191 | } | 191 | } |
192 | 192 | ||
193 | ret = mfd_add_devices(tps->dev, -1, tps65217s, | 193 | ret = mfd_add_devices(tps->dev, -1, tps65217s, |
194 | ARRAY_SIZE(tps65217s), NULL, 0); | 194 | ARRAY_SIZE(tps65217s), NULL, 0, NULL); |
195 | if (ret < 0) { | 195 | if (ret < 0) { |
196 | dev_err(tps->dev, "mfd_add_devices failed: %d\n", ret); | 196 | dev_err(tps->dev, "mfd_add_devices failed: %d\n", ret); |
197 | return ret; | 197 | return ret; |
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 353c34812120..5f58370ccf55 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -493,7 +493,8 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client, | |||
493 | } | 493 | } |
494 | 494 | ||
495 | ret = mfd_add_devices(tps6586x->dev, -1, | 495 | ret = mfd_add_devices(tps6586x->dev, -1, |
496 | tps6586x_cell, ARRAY_SIZE(tps6586x_cell), NULL, 0); | 496 | tps6586x_cell, ARRAY_SIZE(tps6586x_cell), |
497 | NULL, 0, NULL); | ||
497 | if (ret < 0) { | 498 | if (ret < 0) { |
498 | dev_err(&client->dev, "mfd_add_devices failed: %d\n", ret); | 499 | dev_err(&client->dev, "mfd_add_devices failed: %d\n", ret); |
499 | goto err_mfd_add; | 500 | goto err_mfd_add; |
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 1c563792c777..d3ce4d569deb 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c | |||
@@ -254,7 +254,7 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c, | |||
254 | 254 | ||
255 | ret = mfd_add_devices(tps65910->dev, -1, | 255 | ret = mfd_add_devices(tps65910->dev, -1, |
256 | tps65910s, ARRAY_SIZE(tps65910s), | 256 | tps65910s, ARRAY_SIZE(tps65910s), |
257 | NULL, 0); | 257 | NULL, 0, NULL); |
258 | if (ret < 0) { | 258 | if (ret < 0) { |
259 | dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret); | 259 | dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret); |
260 | return ret; | 260 | return ret; |
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c index 74fd8cb5f372..4658b5bdcd84 100644 --- a/drivers/mfd/tps65912-core.c +++ b/drivers/mfd/tps65912-core.c | |||
@@ -146,7 +146,7 @@ int tps65912_device_init(struct tps65912 *tps65912) | |||
146 | 146 | ||
147 | ret = mfd_add_devices(tps65912->dev, -1, | 147 | ret = mfd_add_devices(tps65912->dev, -1, |
148 | tps65912s, ARRAY_SIZE(tps65912s), | 148 | tps65912s, ARRAY_SIZE(tps65912s), |
149 | NULL, 0); | 149 | NULL, 0, NULL); |
150 | if (ret < 0) | 150 | if (ret < 0) |
151 | goto err; | 151 | goto err; |
152 | 152 | ||
diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c index 838ce4eb444e..77c9acb14583 100644 --- a/drivers/mfd/twl4030-audio.c +++ b/drivers/mfd/twl4030-audio.c | |||
@@ -223,7 +223,7 @@ static int __devinit twl4030_audio_probe(struct platform_device *pdev) | |||
223 | 223 | ||
224 | if (childs) | 224 | if (childs) |
225 | ret = mfd_add_devices(&pdev->dev, pdev->id, audio->cells, | 225 | ret = mfd_add_devices(&pdev->dev, pdev->id, audio->cells, |
226 | childs, NULL, 0); | 226 | childs, NULL, 0, NULL); |
227 | else { | 227 | else { |
228 | dev_err(&pdev->dev, "No platform data found for childs\n"); | 228 | dev_err(&pdev->dev, "No platform data found for childs\n"); |
229 | ret = -ENODEV; | 229 | ret = -ENODEV; |
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index b0fad0ffca56..3dca5c195a20 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c | |||
@@ -632,7 +632,7 @@ static int __devinit twl6040_probe(struct i2c_client *client, | |||
632 | } | 632 | } |
633 | 633 | ||
634 | ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children, | 634 | ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children, |
635 | NULL, 0); | 635 | NULL, 0, NULL); |
636 | if (ret) | 636 | if (ret) |
637 | goto mfd_err; | 637 | goto mfd_err; |
638 | 638 | ||
diff --git a/drivers/mfd/vx855.c b/drivers/mfd/vx855.c index 872aff21e4be..b9a636d44c7f 100644 --- a/drivers/mfd/vx855.c +++ b/drivers/mfd/vx855.c | |||
@@ -102,7 +102,7 @@ static __devinit int vx855_probe(struct pci_dev *pdev, | |||
102 | vx855_gpio_resources[1].end = vx855_gpio_resources[1].start + 3; | 102 | vx855_gpio_resources[1].end = vx855_gpio_resources[1].start + 3; |
103 | 103 | ||
104 | ret = mfd_add_devices(&pdev->dev, -1, vx855_cells, ARRAY_SIZE(vx855_cells), | 104 | ret = mfd_add_devices(&pdev->dev, -1, vx855_cells, ARRAY_SIZE(vx855_cells), |
105 | NULL, 0); | 105 | NULL, 0, NULL); |
106 | 106 | ||
107 | /* we always return -ENODEV here in order to enable other | 107 | /* we always return -ENODEV here in order to enable other |
108 | * drivers like old, not-yet-platform_device ported i2c-viapro */ | 108 | * drivers like old, not-yet-platform_device ported i2c-viapro */ |
diff --git a/drivers/mfd/wl1273-core.c b/drivers/mfd/wl1273-core.c index f39b756df561..86e0e4309fc2 100644 --- a/drivers/mfd/wl1273-core.c +++ b/drivers/mfd/wl1273-core.c | |||
@@ -241,7 +241,7 @@ static int __devinit wl1273_core_probe(struct i2c_client *client, | |||
241 | __func__, children); | 241 | __func__, children); |
242 | 242 | ||
243 | r = mfd_add_devices(&client->dev, -1, core->cells, | 243 | r = mfd_add_devices(&client->dev, -1, core->cells, |
244 | children, NULL, 0); | 244 | children, NULL, 0, NULL); |
245 | if (r) | 245 | if (r) |
246 | goto err; | 246 | goto err; |
247 | 247 | ||
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index 2e5d58eb2ec1..521340a708d3 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -1787,27 +1787,27 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1787 | case WM8310: | 1787 | case WM8310: |
1788 | ret = mfd_add_devices(wm831x->dev, wm831x_num, | 1788 | ret = mfd_add_devices(wm831x->dev, wm831x_num, |
1789 | wm8310_devs, ARRAY_SIZE(wm8310_devs), | 1789 | wm8310_devs, ARRAY_SIZE(wm8310_devs), |
1790 | NULL, 0); | 1790 | NULL, 0, NULL); |
1791 | break; | 1791 | break; |
1792 | 1792 | ||
1793 | case WM8311: | 1793 | case WM8311: |
1794 | ret = mfd_add_devices(wm831x->dev, wm831x_num, | 1794 | ret = mfd_add_devices(wm831x->dev, wm831x_num, |
1795 | wm8311_devs, ARRAY_SIZE(wm8311_devs), | 1795 | wm8311_devs, ARRAY_SIZE(wm8311_devs), |
1796 | NULL, 0); | 1796 | NULL, 0, NULL); |
1797 | if (!pdata || !pdata->disable_touch) | 1797 | if (!pdata || !pdata->disable_touch) |
1798 | mfd_add_devices(wm831x->dev, wm831x_num, | 1798 | mfd_add_devices(wm831x->dev, wm831x_num, |
1799 | touch_devs, ARRAY_SIZE(touch_devs), | 1799 | touch_devs, ARRAY_SIZE(touch_devs), |
1800 | NULL, 0); | 1800 | NULL, 0, NULL); |
1801 | break; | 1801 | break; |
1802 | 1802 | ||
1803 | case WM8312: | 1803 | case WM8312: |
1804 | ret = mfd_add_devices(wm831x->dev, wm831x_num, | 1804 | ret = mfd_add_devices(wm831x->dev, wm831x_num, |
1805 | wm8312_devs, ARRAY_SIZE(wm8312_devs), | 1805 | wm8312_devs, ARRAY_SIZE(wm8312_devs), |
1806 | NULL, 0); | 1806 | NULL, 0, NULL); |
1807 | if (!pdata || !pdata->disable_touch) | 1807 | if (!pdata || !pdata->disable_touch) |
1808 | mfd_add_devices(wm831x->dev, wm831x_num, | 1808 | mfd_add_devices(wm831x->dev, wm831x_num, |
1809 | touch_devs, ARRAY_SIZE(touch_devs), | 1809 | touch_devs, ARRAY_SIZE(touch_devs), |
1810 | NULL, 0); | 1810 | NULL, 0, NULL); |
1811 | break; | 1811 | break; |
1812 | 1812 | ||
1813 | case WM8320: | 1813 | case WM8320: |
@@ -1816,7 +1816,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1816 | case WM8326: | 1816 | case WM8326: |
1817 | ret = mfd_add_devices(wm831x->dev, wm831x_num, | 1817 | ret = mfd_add_devices(wm831x->dev, wm831x_num, |
1818 | wm8320_devs, ARRAY_SIZE(wm8320_devs), | 1818 | wm8320_devs, ARRAY_SIZE(wm8320_devs), |
1819 | NULL, 0); | 1819 | NULL, 0, NULL); |
1820 | break; | 1820 | break; |
1821 | 1821 | ||
1822 | default: | 1822 | default: |
@@ -1841,7 +1841,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1841 | if (ret & WM831X_XTAL_ENA) { | 1841 | if (ret & WM831X_XTAL_ENA) { |
1842 | ret = mfd_add_devices(wm831x->dev, wm831x_num, | 1842 | ret = mfd_add_devices(wm831x->dev, wm831x_num, |
1843 | rtc_devs, ARRAY_SIZE(rtc_devs), | 1843 | rtc_devs, ARRAY_SIZE(rtc_devs), |
1844 | NULL, 0); | 1844 | NULL, 0, NULL); |
1845 | if (ret != 0) { | 1845 | if (ret != 0) { |
1846 | dev_err(wm831x->dev, "Failed to add RTC: %d\n", ret); | 1846 | dev_err(wm831x->dev, "Failed to add RTC: %d\n", ret); |
1847 | goto err_irq; | 1847 | goto err_irq; |
@@ -1854,7 +1854,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | |||
1854 | /* Treat errors as non-critical */ | 1854 | /* Treat errors as non-critical */ |
1855 | ret = mfd_add_devices(wm831x->dev, wm831x_num, backlight_devs, | 1855 | ret = mfd_add_devices(wm831x->dev, wm831x_num, backlight_devs, |
1856 | ARRAY_SIZE(backlight_devs), NULL, | 1856 | ARRAY_SIZE(backlight_devs), NULL, |
1857 | 0); | 1857 | 0, NULL); |
1858 | if (ret < 0) | 1858 | if (ret < 0) |
1859 | dev_err(wm831x->dev, "Failed to add backlight: %d\n", | 1859 | dev_err(wm831x->dev, "Failed to add backlight: %d\n", |
1860 | ret); | 1860 | ret); |
diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index 4b7d378551d5..639ca359242f 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c | |||
@@ -70,7 +70,7 @@ static int wm8400_register_codec(struct wm8400 *wm8400) | |||
70 | .pdata_size = sizeof(*wm8400), | 70 | .pdata_size = sizeof(*wm8400), |
71 | }; | 71 | }; |
72 | 72 | ||
73 | return mfd_add_devices(wm8400->dev, -1, &cell, 1, NULL, 0); | 73 | return mfd_add_devices(wm8400->dev, -1, &cell, 1, NULL, 0, NULL); |
74 | } | 74 | } |
75 | 75 | ||
76 | /* | 76 | /* |
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index eec74aa55fdf..2febf88cfce8 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -414,7 +414,7 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
414 | ret = mfd_add_devices(wm8994->dev, -1, | 414 | ret = mfd_add_devices(wm8994->dev, -1, |
415 | wm8994_regulator_devs, | 415 | wm8994_regulator_devs, |
416 | ARRAY_SIZE(wm8994_regulator_devs), | 416 | ARRAY_SIZE(wm8994_regulator_devs), |
417 | NULL, 0); | 417 | NULL, 0, NULL); |
418 | if (ret != 0) { | 418 | if (ret != 0) { |
419 | dev_err(wm8994->dev, "Failed to add children: %d\n", ret); | 419 | dev_err(wm8994->dev, "Failed to add children: %d\n", ret); |
420 | goto err; | 420 | goto err; |
@@ -648,7 +648,7 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
648 | 648 | ||
649 | ret = mfd_add_devices(wm8994->dev, -1, | 649 | ret = mfd_add_devices(wm8994->dev, -1, |
650 | wm8994_devs, ARRAY_SIZE(wm8994_devs), | 650 | wm8994_devs, ARRAY_SIZE(wm8994_devs), |
651 | NULL, 0); | 651 | NULL, 0, NULL); |
652 | if (ret != 0) { | 652 | if (ret != 0) { |
653 | dev_err(wm8994->dev, "Failed to add children: %d\n", ret); | 653 | dev_err(wm8994->dev, "Failed to add children: %d\n", ret); |
654 | goto err_irq; | 654 | goto err_irq; |
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 695ea35f75b0..d0a7e408efe9 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
@@ -837,7 +837,7 @@ static int __devinit tegra_nvec_probe(struct platform_device *pdev) | |||
837 | } | 837 | } |
838 | 838 | ||
839 | ret = mfd_add_devices(nvec->dev, -1, nvec_devices, | 839 | ret = mfd_add_devices(nvec->dev, -1, nvec_devices, |
840 | ARRAY_SIZE(nvec_devices), base, 0); | 840 | ARRAY_SIZE(nvec_devices), base, 0, NULL); |
841 | if (ret) | 841 | if (ret) |
842 | dev_err(nvec->dev, "error adding subdevices\n"); | 842 | dev_err(nvec->dev, "error adding subdevices\n"); |
843 | 843 | ||
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 3a8435a8058f..cebe97ee98b8 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | 18 | ||
19 | struct irq_domain; | ||
20 | |||
19 | /* | 21 | /* |
20 | * This struct describes the MFD part ("cell"). | 22 | * This struct describes the MFD part ("cell"). |
21 | * After registration the copy of this structure will become the platform data | 23 | * After registration the copy of this structure will become the platform data |
@@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
98 | extern int mfd_add_devices(struct device *parent, int id, | 100 | extern int mfd_add_devices(struct device *parent, int id, |
99 | struct mfd_cell *cells, int n_devs, | 101 | struct mfd_cell *cells, int n_devs, |
100 | struct resource *mem_base, | 102 | struct resource *mem_base, |
101 | int irq_base); | 103 | int irq_base, struct irq_domain *irq_domain); |
102 | 104 | ||
103 | extern void mfd_remove_devices(struct device *parent); | 105 | extern void mfd_remove_devices(struct device *parent); |
104 | 106 | ||