Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310666
b: refs/heads/master
c: 7452ca5
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 12, 2012
1 parent 823edad commit 1381251
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70c778f7a1075cf688ef50ca52c464e7ea60b506
refs/heads/master: 7452ca511c217b9d7bbadf4680018555c7d9a7ce
6 changes: 4 additions & 2 deletions trunk/arch/x86/crypto/aesni-intel_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -2460,10 +2460,12 @@ ENTRY(aesni_cbc_dec)
pxor IN3, STATE4
movaps IN4, IV
#else
pxor (INP), STATE2
pxor 0x10(INP), STATE3
pxor IN1, STATE4
movaps IN2, IV
movups (INP), IN1
pxor IN1, STATE2
movups 0x10(INP), IN2
pxor IN2, STATE3
#endif
movups STATE1, (OUTP)
movups STATE2, 0x10(OUTP)
Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ struct regmap *regmap_init(struct device *dev,
map->lock = regmap_lock_mutex;
map->unlock = regmap_unlock_mutex;
}
map->format.buf_size = (config->reg_bits + config->val_bits) / 8;
map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);
map->format.pad_bytes = config->pad_bits / 8;
map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
map->format.buf_size += map->format.pad_bytes;
map->format.buf_size = DIV_ROUND_UP(config->reg_bits +
config->val_bits + config->pad_bits, 8);
map->reg_shift = config->pad_bits % 8;
if (config->reg_stride)
map->reg_stride = config->reg_stride;
Expand Down Expand Up @@ -368,7 +368,7 @@ struct regmap *regmap_init(struct device *dev,

ret = regcache_init(map, config);
if (ret < 0)
goto err_free_workbuf;
goto err_debugfs;

/* Add a devres resource for dev_get_regmap() */
m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL);
Expand All @@ -383,7 +383,8 @@ struct regmap *regmap_init(struct device *dev,

err_cache:
regcache_exit(map);
err_free_workbuf:
err_debugfs:
regmap_debugfs_exit(map);
kfree(map->work_buf);
err_map:
kfree(map);
Expand Down Expand Up @@ -471,6 +472,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)

return ret;
}
EXPORT_SYMBOL_GPL(regmap_reinit_cache);

/**
* regmap_exit(): Free a previously allocated register map
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/char/hw_random/atmel-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
/* data ready? */
if (readl(trng->base + TRNG_ODATA) & 1) {
*data = readl(trng->base + TRNG_ODATA);
/*
ensure data ready is only set again AFTER the next data
word is ready in case it got set between checking ISR
and reading ODATA, so we don't risk re-reading the
same word
*/
readl(trng->base + TRNG_ISR);
return 4;
} else
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/regulator/anatop-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static struct platform_driver anatop_regulator_driver = {
.of_match_table = of_anatop_regulator_match_tbl,
},
.probe = anatop_regulator_probe,
.remove = anatop_regulator_remove,
.remove = __devexit_p(anatop_regulator_remove),
};

static int __init anatop_regulator_init(void)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,9 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
return -EINVAL;
}

if (min_uV < rdev->desc->min_uV)
min_uV = rdev->desc->min_uV;

ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step);
if (ret < 0)
return ret;
Expand Down
16 changes: 10 additions & 6 deletions trunk/drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,20 @@ static int gpio_regulator_get_value(struct regulator_dev *dev)
}

static int gpio_regulator_set_value(struct regulator_dev *dev,
int min, int max)
int min, int max, unsigned *selector)
{
struct gpio_regulator_data *data = rdev_get_drvdata(dev);
int ptr, target, state, best_val = INT_MAX;
int ptr, target = 0, state, best_val = INT_MAX;

for (ptr = 0; ptr < data->nr_states; ptr++)
if (data->states[ptr].value < best_val &&
data->states[ptr].value >= min &&
data->states[ptr].value <= max)
data->states[ptr].value <= max) {
target = data->states[ptr].gpios;
best_val = data->states[ptr].value;
if (selector)
*selector = ptr;
}

if (best_val == INT_MAX)
return -EINVAL;
Expand All @@ -128,7 +132,7 @@ static int gpio_regulator_set_voltage(struct regulator_dev *dev,
int min_uV, int max_uV,
unsigned *selector)
{
return gpio_regulator_set_value(dev, min_uV, max_uV);
return gpio_regulator_set_value(dev, min_uV, max_uV, selector);
}

static int gpio_regulator_list_voltage(struct regulator_dev *dev,
Expand All @@ -145,7 +149,7 @@ static int gpio_regulator_list_voltage(struct regulator_dev *dev,
static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
int min_uA, int max_uA)
{
return gpio_regulator_set_value(dev, min_uA, max_uA);
return gpio_regulator_set_value(dev, min_uA, max_uA, NULL);
}

static struct regulator_ops gpio_regulator_voltage_ops = {
Expand Down Expand Up @@ -286,7 +290,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)

cfg.dev = &pdev->dev;
cfg.init_data = config->init_data;
cfg.driver_data = &drvdata;
cfg.driver_data = drvdata;

drvdata->dev = regulator_register(&drvdata->desc, &cfg);
if (IS_ERR(drvdata->dev)) {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/regulator/max8649.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
config.dev = &client->dev;
config.init_data = pdata->regulator;
config.driver_data = info;
config.regmap = info->regmap;

info->regulator = regulator_register(&dcdc_desc, &config);
if (IS_ERR(info->regulator)) {
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,6 @@ static __devinit int palmas_probe(struct platform_device *pdev)
err_unregister_regulator:
while (--id >= 0)
regulator_unregister(pmic->rdev[id]);
kfree(pmic->rdev);
kfree(pmic->desc);
kfree(pmic);
return ret;
}

Expand All @@ -788,10 +785,6 @@ static int __devexit palmas_remove(struct platform_device *pdev)

for (id = 0; id < PALMAS_NUM_REGS; id++)
regulator_unregister(pmic->rdev[id]);

kfree(pmic->rdev);
kfree(pmic->desc);
kfree(pmic);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/exofs/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static struct kobj_type odev_ktype = {
static struct kobj_type uuid_ktype = {
};

void exofs_sysfs_dbg_print()
void exofs_sysfs_dbg_print(void)
{
#ifdef CONFIG_EXOFS_DEBUG
struct kobject *k_name, *k_tmp;
Expand Down

0 comments on commit 1381251

Please sign in to comment.