mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
regulator: Fixes for v3.14
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJS8iRIAAoJELSic+t+oim9p98P/A7ILwXsvhM3fIN9jGOPZPks Q2yynqjVnEsfAJ9h4sa8cMKkQcWlBJ2+/M3AH03dnoZ5q+vA76ujNrnJHYtu5jH1 oyVAqP6gmArrGsGe2eO9NQ+Cgjh1zPc3/aREZEopKQbDMxNnDr5b5juzAGlifWBG +kDjTdTiNW9eJ7dJJdHh2Y+OZEnFqxRNtbboK6bayrKtUqI8bZjYgsVSyX7US7Lp yX36cGi/iLbdI5FgJHDIdPMjZRO5fqPbG4C1ktghT8liD9DtUXMaMNSQYzjOy8Np z15E4U7CB1uEn5rz/Lk3mOGqp+G4ttMd7ZIfC18faAgZWRwdY5gqFH9X0t4rVRUN C8oQex0qzYWyzoRvix6gpSa9yrc2sUvv2mEHGSGJRO7mMbjJCVj3Hkan7iFgG1jU dbQVh67Ww29Vjyh83L4Pw4KaT12LQUUiu01N7nUcYoqJQO+leJMy40qF7tMTl/bq nJbrf2uqGmkvZJ0u5hyI4N2lZICzzUHR6ySsTx3qKFUaudYWoopyplfQ5YubukUV q2fADCBxfR3zwA2PzOP612bOVK1uFx+/EtRLkn5JgI87MbNdbgvQzF4qi/p5MF4V qYhvLRcUzAI82FPSYju894nwwsEyy4B6pxItdtQgr0hgsjmVD2FPZmdxehosF4IA xWfmkocBjDdX7VAIo0Ld =2an0 -----END PGP SIGNATURE----- Merge tag 'regulator-v3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator 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
This commit is contained in:
commit
71c27a8c67
3 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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(®ulator_list_mutex);
|
||||
|
||||
rdev = regulator_dev_lookup(dev, id, &ret);
|
||||
|
|
|
@ -441,6 +441,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue