Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349619
b: refs/heads/master
c: 2a1a6e7
h: refs/heads/master
i:
  349617: 93c6026
  349615: 97e7913
v: v3
  • Loading branch information
Linus Torvalds committed Feb 8, 2013
1 parent c79e0bb commit d44333f
Show file tree
Hide file tree
Showing 28 changed files with 171 additions and 101 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: ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4
refs/heads/master: 2a1a6e7af41cd029c90b8d9d79a76452a864805e
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT
select CPU_EXYNOS4210
select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
select PINCTRL
select PINCTRL_EXYNOS4
select PINCTRL_EXYNOS
select USE_OF
help
Machine support for Samsung Exynos4 machine with device tree enabled.
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,8 @@ static void virtcons_remove(struct virtio_device *vdev)
/* Disable interrupts for vqs */
vdev->config->reset(vdev);
/* Finish up work that's lined up */
cancel_work_sync(&portdev->control_work);
if (use_multiport(portdev))
cancel_work_sync(&portdev->control_work);

list_for_each_entry_safe(port, port2, &portdev->ports, list)
unplug_port(port);
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/infiniband/hw/qib/qib_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,20 +263,15 @@ static void remove_qp(struct qib_ibdev *dev, struct qib_qp *qp)
struct qib_qp __rcu **qpp;

qpp = &dev->qp_table[n];
q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock));
for (; q; qpp = &q->next) {
for (; (q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock))) != NULL;
qpp = &q->next)
if (q == qp) {
atomic_dec(&qp->refcount);
*qpp = qp->next;
rcu_assign_pointer(qp->next, NULL);
q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock));
break;
}
q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock));
}
}

spin_unlock_irqrestore(&dev->qpt_lock, flags);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_

tx_req->mapping = addr;

skb_orphan(skb);
skb_dst_drop(skb);

rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
addr, skb->len);
if (unlikely(rc)) {
Expand All @@ -752,9 +755,6 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
dev->trans_start = jiffies;
++tx->tx_head;

skb_orphan(skb);
skb_dst_drop(skb);

if (++priv->tx_outstanding == ipoib_sendq_size) {
ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n",
tx->qp->qp_num);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
netif_stop_queue(dev);
}

skb_orphan(skb);
skb_dst_drop(skb);

rc = post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),
address->ah, qpn, tx_req, phead, hlen);
if (unlikely(rc)) {
Expand All @@ -615,9 +618,6 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,

address->last_send = priv->tx_head;
++priv->tx_head;

skb_orphan(skb);
skb_dst_drop(skb);
}

if (unlikely(priv->tx_outstanding > MAX_SEND_CQE))
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
}
}

if ((dev_cap->flags &
if ((dev->caps.flags &
(MLX4_DEV_CAP_FLAG_64B_CQE | MLX4_DEV_CAP_FLAG_64B_EQE)) &&
mlx4_is_master(dev))
dev->caps.function_caps |= MLX4_FUNC_CAP_64B_EQE_CQE;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pinctrl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG
select PINMUX
select PINCONF

config PINCTRL_EXYNOS4
bool "Pinctrl driver data for Exynos4 SoC"
config PINCTRL_EXYNOS
bool "Pinctrl driver data for Samsung EXYNOS SoCs"
depends on OF && GPIOLIB
select PINCTRL_SAMSUNG

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pinctrl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o
obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o
obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o
obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o
obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o
obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o
obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o
obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/pinctrl/pinctrl-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
return of_iomap(np, 0);
}

static int sirfsoc_gpio_of_xlate(struct gpio_chip *gc,
const struct of_phandle_args *gpiospec,
u32 *flags)
{
if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE)
return -EINVAL;

if (gc != &sgpio_bank[gpiospec->args[0] / SIRFSOC_GPIO_BANK_SIZE].chip.gc)
return -EINVAL;

if (flags)
*flags = gpiospec->args[1];

return gpiospec->args[0] % SIRFSOC_GPIO_BANK_SIZE;
}

static int sirfsoc_pinmux_probe(struct platform_device *pdev)
{
int ret;
Expand Down Expand Up @@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE;
bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL);
bank->chip.gc.of_node = np;
bank->chip.gc.of_xlate = sirfsoc_gpio_of_xlate;
bank->chip.gc.of_gpio_n_cells = 2;
bank->chip.regs = regs;
bank->id = i;
bank->is_marco = is_marco;
Expand Down
15 changes: 8 additions & 7 deletions trunk/drivers/regulator/max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,10 @@ static struct regulator_desc regulators[] = {
};

#ifdef CONFIG_OF
static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
struct max77686_platform_data *pdata)
{
struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct device_node *pmic_np, *regulators_np;
struct max77686_regulator_data *rdata;
struct of_regulator_match rmatch;
Expand All @@ -390,15 +391,15 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
pmic_np = iodev->dev->of_node;
regulators_np = of_find_node_by_name(pmic_np, "voltage-regulators");
if (!regulators_np) {
dev_err(iodev->dev, "could not find regulators sub-node\n");
dev_err(&pdev->dev, "could not find regulators sub-node\n");
return -EINVAL;
}

pdata->num_regulators = ARRAY_SIZE(regulators);
rdata = devm_kzalloc(iodev->dev, sizeof(*rdata) *
rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
pdata->num_regulators, GFP_KERNEL);
if (!rdata) {
dev_err(iodev->dev,
dev_err(&pdev->dev,
"could not allocate memory for regulator data\n");
return -ENOMEM;
}
Expand All @@ -407,7 +408,7 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
rmatch.name = regulators[i].name;
rmatch.init_data = NULL;
rmatch.of_node = NULL;
of_regulator_match(iodev->dev, regulators_np, &rmatch, 1);
of_regulator_match(&pdev->dev, regulators_np, &rmatch, 1);
rdata[i].initdata = rmatch.init_data;
rdata[i].of_node = rmatch.of_node;
}
Expand All @@ -417,7 +418,7 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
return 0;
}
#else
static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
struct max77686_platform_data *pdata)
{
return 0;
Expand All @@ -440,7 +441,7 @@ static int max77686_pmic_probe(struct platform_device *pdev)
}

if (iodev->dev->of_node) {
ret = max77686_pmic_dt_parse_pdata(iodev, pdata);
ret = max77686_pmic_dt_parse_pdata(pdev, pdata);
if (ret)
return ret;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/regulator/max8907-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev)
return -EINVAL;
}

ret = of_regulator_match(pdev->dev.parent, regulators,
max8907_matches,
ret = of_regulator_match(&pdev->dev, regulators, max8907_matches,
ARRAY_SIZE(max8907_matches));
if (ret < 0) {
dev_err(&pdev->dev, "Error parsing regulator init data: %d\n",
Expand Down
39 changes: 19 additions & 20 deletions trunk/drivers/regulator/max8997.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ static struct regulator_desc regulators[] = {
};

#ifdef CONFIG_OF
static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev,
static int max8997_pmic_dt_parse_dvs_gpio(struct platform_device *pdev,
struct max8997_platform_data *pdata,
struct device_node *pmic_np)
{
Expand All @@ -944,30 +944,31 @@ static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev,
gpio = of_get_named_gpio(pmic_np,
"max8997,pmic-buck125-dvs-gpios", i);
if (!gpio_is_valid(gpio)) {
dev_err(iodev->dev, "invalid gpio[%d]: %d\n", i, gpio);
dev_err(&pdev->dev, "invalid gpio[%d]: %d\n", i, gpio);
return -EINVAL;
}
pdata->buck125_gpios[i] = gpio;
}
return 0;
}

static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,
struct max8997_platform_data *pdata)
{
struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct device_node *pmic_np, *regulators_np, *reg_np;
struct max8997_regulator_data *rdata;
unsigned int i, dvs_voltage_nr = 1, ret;

pmic_np = iodev->dev->of_node;
if (!pmic_np) {
dev_err(iodev->dev, "could not find pmic sub-node\n");
dev_err(&pdev->dev, "could not find pmic sub-node\n");
return -ENODEV;
}

regulators_np = of_find_node_by_name(pmic_np, "regulators");
if (!regulators_np) {
dev_err(iodev->dev, "could not find regulators sub-node\n");
dev_err(&pdev->dev, "could not find regulators sub-node\n");
return -EINVAL;
}

Expand All @@ -976,11 +977,10 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
for_each_child_of_node(regulators_np, reg_np)
pdata->num_regulators++;

rdata = devm_kzalloc(iodev->dev, sizeof(*rdata) *
rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
pdata->num_regulators, GFP_KERNEL);
if (!rdata) {
dev_err(iodev->dev, "could not allocate memory for "
"regulator data\n");
dev_err(&pdev->dev, "could not allocate memory for regulator data\n");
return -ENOMEM;
}

Expand All @@ -991,14 +991,14 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
break;

if (i == ARRAY_SIZE(regulators)) {
dev_warn(iodev->dev, "don't know how to configure "
"regulator %s\n", reg_np->name);
dev_warn(&pdev->dev, "don't know how to configure regulator %s\n",
reg_np->name);
continue;
}

rdata->id = i;
rdata->initdata = of_get_regulator_init_data(
iodev->dev, reg_np);
rdata->initdata = of_get_regulator_init_data(&pdev->dev,
reg_np);
rdata->reg_node = reg_np;
rdata++;
}
Expand All @@ -1014,7 +1014,7 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,

if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs ||
pdata->buck5_gpiodvs) {
ret = max8997_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
ret = max8997_pmic_dt_parse_dvs_gpio(pdev, pdata, pmic_np);
if (ret)
return -EINVAL;

Expand All @@ -1025,8 +1025,7 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
} else {
if (pdata->buck125_default_idx >= 8) {
pdata->buck125_default_idx = 0;
dev_info(iodev->dev, "invalid value for "
"default dvs index, using 0 instead\n");
dev_info(&pdev->dev, "invalid value for default dvs index, using 0 instead\n");
}
}

Expand All @@ -1040,28 +1039,28 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
if (of_property_read_u32_array(pmic_np,
"max8997,pmic-buck1-dvs-voltage",
pdata->buck1_voltage, dvs_voltage_nr)) {
dev_err(iodev->dev, "buck1 voltages not specified\n");
dev_err(&pdev->dev, "buck1 voltages not specified\n");
return -EINVAL;
}

if (of_property_read_u32_array(pmic_np,
"max8997,pmic-buck2-dvs-voltage",
pdata->buck2_voltage, dvs_voltage_nr)) {
dev_err(iodev->dev, "buck2 voltages not specified\n");
dev_err(&pdev->dev, "buck2 voltages not specified\n");
return -EINVAL;
}

if (of_property_read_u32_array(pmic_np,
"max8997,pmic-buck5-dvs-voltage",
pdata->buck5_voltage, dvs_voltage_nr)) {
dev_err(iodev->dev, "buck5 voltages not specified\n");
dev_err(&pdev->dev, "buck5 voltages not specified\n");
return -EINVAL;
}

return 0;
}
#else
static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,
struct max8997_platform_data *pdata)
{
return 0;
Expand All @@ -1085,7 +1084,7 @@ static int max8997_pmic_probe(struct platform_device *pdev)
}

if (iodev->dev->of_node) {
ret = max8997_pmic_dt_parse_pdata(iodev, pdata);
ret = max8997_pmic_dt_parse_pdata(pdev, pdata);
if (ret)
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/regulator/max8998.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static const struct voltage_map_desc ldo9_voltage_map_desc = {
.min = 2800000, .step = 100000, .max = 3100000,
};
static const struct voltage_map_desc ldo10_voltage_map_desc = {
.min = 95000, .step = 50000, .max = 1300000,
.min = 950000, .step = 50000, .max = 1300000,
};
static const struct voltage_map_desc ldo1213_voltage_map_desc = {
.min = 800000, .step = 100000, .max = 3300000,
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/regulator/of_regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ int of_regulator_match(struct device *dev, struct device_node *node,
if (!dev || !node)
return -EINVAL;

for (i = 0; i < num_matches; i++) {
struct of_regulator_match *match = &matches[i];
match->init_data = NULL;
match->of_node = NULL;
}

for_each_child_of_node(node, child) {
name = of_get_property(child,
"regulator-compatible", NULL);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/regulator/s2mps11.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ static struct regulator_ops s2mps11_buck_ops = {
.min_uV = S2MPS11_BUCK_MIN2, \
.uV_step = S2MPS11_BUCK_STEP2, \
.n_voltages = S2MPS11_BUCK_N_VOLTAGES, \
.vsel_reg = S2MPS11_REG_B9CTRL2, \
.vsel_reg = S2MPS11_REG_B10CTRL2, \
.vsel_mask = S2MPS11_BUCK_VSEL_MASK, \
.enable_reg = S2MPS11_REG_B9CTRL1, \
.enable_reg = S2MPS11_REG_B10CTRL1, \
.enable_mask = S2MPS11_ENABLE_MASK \
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/regulator/tps65217-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ static struct tps65217_board *tps65217_parse_dt(struct platform_device *pdev)
if (!regs)
return NULL;

count = of_regulator_match(pdev->dev.parent, regs,
reg_matches, TPS65217_NUM_REGULATOR);
count = of_regulator_match(&pdev->dev, regs, reg_matches,
TPS65217_NUM_REGULATOR);
of_node_put(regs);
if ((count < 0) || (count > TPS65217_NUM_REGULATOR))
return NULL;
Expand Down
Loading

0 comments on commit d44333f

Please sign in to comment.