linux-next: manual merge of the mfd tree with the regulator-fixes tree

From: Stephen Rothwell
Date: Mon Jan 27 2020 - 20:05:39 EST


Hi all,

Today's linux-next merge of the mfd tree got a conflict in:

drivers/regulator/bd718x7-regulator.c

between commit:

b389ceae4a8f ("regulator: bd718x7: Simplify the code by removing struct bd718xx_pmic_inits")

from the regulator-fixes tree and commit:

1b1c26b24a6e ("mfd: Rohm PMICs: Use platform_device_id to match MFD sub-devices")

from the mfd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/regulator/bd718x7-regulator.c
index 8f9b2d8eaf10,55decb58c777..000000000000
--- a/drivers/regulator/bd718x7-regulator.c
+++ b/drivers/regulator/bd718x7-regulator.c
@@@ -1146,10 -1078,20 +1073,11 @@@ static int bd718xx_probe(struct platfor
{
struct bd718xx *mfd;
struct regulator_config config = { 0 };
- struct bd718xx_pmic_inits pmic_regulators[ROHM_CHIP_TYPE_AMOUNT] = {
- [ROHM_CHIP_TYPE_BD71837] = {
- .r_datas = bd71837_regulators,
- .r_amount = ARRAY_SIZE(bd71837_regulators),
- },
- [ROHM_CHIP_TYPE_BD71847] = {
- .r_datas = bd71847_regulators,
- .r_amount = ARRAY_SIZE(bd71847_regulators),
- },
- };
-
int i, j, err;
bool use_snvs;
+ const struct bd718xx_regulator_data *reg_data;
+ unsigned int num_reg_data;
+ enum rohm_chip_type chip = platform_get_device_id(pdev)->driver_data;

mfd = dev_get_drvdata(pdev->dev.parent);
if (!mfd) {
@@@ -1158,16 -1100,8 +1086,16 @@@
goto err;
}

- switch (mfd->chip.chip_type) {
- if (chip >= ROHM_CHIP_TYPE_AMOUNT || chip < 0 ||
- !pmic_regulators[chip].r_datas) {
++ switch (chip) {
+ case ROHM_CHIP_TYPE_BD71837:
+ reg_data = bd71837_regulators;
+ num_reg_data = ARRAY_SIZE(bd71837_regulators);
+ break;
+ case ROHM_CHIP_TYPE_BD71847:
+ reg_data = bd71847_regulators;
+ num_reg_data = ARRAY_SIZE(bd71847_regulators);
+ break;
+ default:
dev_err(&pdev->dev, "Unsupported chip type\n");
err = -EINVAL;
goto err;

Attachment: pgpABHvrarDy3.pgp
Description: OpenPGP digital signature