diff options
-rw-r--r-- | drivers/mfd/tps65910.c | 4 | ||||
-rw-r--r-- | drivers/mfd/twl6040.c | 8 | ||||
-rw-r--r-- | include/linux/regmap.h | 2 |
3 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 72f2e789ab83..c0f608e3ca9e 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c | |||
@@ -411,14 +411,10 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client, | |||
411 | ret = of_property_read_u32(np, "ti,vmbch-threshold", &prop); | 411 | ret = of_property_read_u32(np, "ti,vmbch-threshold", &prop); |
412 | if (!ret) | 412 | if (!ret) |
413 | board_info->vmbch_threshold = prop; | 413 | board_info->vmbch_threshold = prop; |
414 | else if (*chip_id == TPS65911) | ||
415 | dev_warn(&client->dev, "VMBCH-Threshold not specified"); | ||
416 | 414 | ||
417 | ret = of_property_read_u32(np, "ti,vmbch2-threshold", &prop); | 415 | ret = of_property_read_u32(np, "ti,vmbch2-threshold", &prop); |
418 | if (!ret) | 416 | if (!ret) |
419 | board_info->vmbch2_threshold = prop; | 417 | board_info->vmbch2_threshold = prop; |
420 | else if (*chip_id == TPS65911) | ||
421 | dev_warn(&client->dev, "VMBCH2-Threshold not specified"); | ||
422 | 418 | ||
423 | prop = of_property_read_bool(np, "ti,en-ck32k-xtal"); | 419 | prop = of_property_read_bool(np, "ti,en-ck32k-xtal"); |
424 | board_info->en_ck32k_xtal = prop; | 420 | board_info->en_ck32k_xtal = prop; |
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 7361dbe96be8..0779d5ab9ab1 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c | |||
@@ -565,13 +565,13 @@ static int twl6040_probe(struct i2c_client *client, | |||
565 | twl6040->supplies); | 565 | twl6040->supplies); |
566 | if (ret != 0) { | 566 | if (ret != 0) { |
567 | dev_err(&client->dev, "Failed to get supplies: %d\n", ret); | 567 | dev_err(&client->dev, "Failed to get supplies: %d\n", ret); |
568 | goto regulator_get_err; | 568 | return ret; |
569 | } | 569 | } |
570 | 570 | ||
571 | ret = regulator_bulk_enable(TWL6040_NUM_SUPPLIES, twl6040->supplies); | 571 | ret = regulator_bulk_enable(TWL6040_NUM_SUPPLIES, twl6040->supplies); |
572 | if (ret != 0) { | 572 | if (ret != 0) { |
573 | dev_err(&client->dev, "Failed to enable supplies: %d\n", ret); | 573 | dev_err(&client->dev, "Failed to enable supplies: %d\n", ret); |
574 | goto regulator_get_err; | 574 | return ret; |
575 | } | 575 | } |
576 | 576 | ||
577 | twl6040->dev = &client->dev; | 577 | twl6040->dev = &client->dev; |
@@ -667,9 +667,6 @@ readyirq_err: | |||
667 | regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); | 667 | regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); |
668 | gpio_err: | 668 | gpio_err: |
669 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); | 669 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); |
670 | regulator_get_err: | ||
671 | i2c_set_clientdata(client, NULL); | ||
672 | |||
673 | return ret; | 670 | return ret; |
674 | } | 671 | } |
675 | 672 | ||
@@ -683,7 +680,6 @@ static int twl6040_remove(struct i2c_client *client) | |||
683 | regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); | 680 | regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); |
684 | 681 | ||
685 | mfd_remove_devices(&client->dev); | 682 | mfd_remove_devices(&client->dev); |
686 | i2c_set_clientdata(client, NULL); | ||
687 | 683 | ||
688 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); | 684 | regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); |
689 | 685 | ||
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a10380bfbeac..7d3ae2be6869 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -70,6 +70,8 @@ struct regmap_range { | |||
70 | unsigned int range_max; | 70 | unsigned int range_max; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define regmap_reg_range(low, high) { .range_min = low, .range_max = high, } | ||
74 | |||
73 | /* | 75 | /* |
74 | * A table of ranges including some yes ranges and some no ranges. | 76 | * A table of ranges including some yes ranges and some no ranges. |
75 | * If a register belongs to a no_range, the corresponding check function | 77 | * If a register belongs to a no_range, the corresponding check function |