Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71c27a8c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator fixes from Mark Brown:
 "A couple of driver fixes here but the main thing is a fix to the
  checks for deferred probe non-DT systems with fully specified
  regulators which had been broken by a device tree fix which meant that
  we wouldn't insert optional regulators.

  This had slipped through the cracks since very few systems do that in
  the first place and those that do it in mainline don't need optional
  regulators anyway"

* tag 'regulator-v3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: s2mps11: Fix NULL pointer of_node value when using platform data
  regulator: core: Correct default return value for full constraints
  regulator: ab3100: cast fix
parents 4293242d a6a671e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -498,7 +498,7 @@ static int ab3100_regulator_register(struct platform_device *pdev,
				     struct ab3100_platform_data *plfdata,
				     struct regulator_init_data *init_data,
				     struct device_node *np,
				     int id)
				     unsigned long id)
{
	struct regulator_desc *desc;
	struct ab3100_regulator *reg;
@@ -646,7 +646,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
		err = ab3100_regulator_register(
			pdev, NULL, ab3100_regulator_matches[i].init_data,
			ab3100_regulator_matches[i].of_node,
			(int) ab3100_regulator_matches[i].driver_data);
			(unsigned long)ab3100_regulator_matches[i].driver_data);
		if (err) {
			ab3100_regulators_remove(pdev);
			return err;
+8 −1
Original line number Diff line number Diff line
@@ -1272,6 +1272,8 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
				if (r->dev.parent &&
					node == r->dev.of_node)
					return r;
			*ret = -EPROBE_DEFER;
			return NULL;
		} else {
			/*
			 * If we couldn't even get the node then it's
@@ -1312,7 +1314,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
	struct regulator_dev *rdev;
	struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
	const char *devname = NULL;
	int ret = -EPROBE_DEFER;
	int ret;

	if (id == NULL) {
		pr_err("get() with no identifier\n");
@@ -1322,6 +1324,11 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
	if (dev)
		devname = dev_name(dev);

	if (have_full_constraints())
		ret = -ENODEV;
	else
		ret = -EPROBE_DEFER;

	mutex_lock(&regulator_list_mutex);

	rdev = regulator_dev_lookup(dev, id, &ret);
+1 −0
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ common_reg:
	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
		if (!reg_np) {
			config.init_data = pdata->regulators[i].initdata;
			config.of_node = pdata->regulators[i].reg_node;
		} else {
			config.init_data = rdata[i].init_data;
			config.of_node = rdata[i].of_node;