Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349618
b: refs/heads/master
c: ff7c60c
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Feb 8, 2013
1 parent 93c6026 commit c79e0bb
Show file tree
Hide file tree
Showing 29 changed files with 109 additions and 176 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: 124b69b6cc1020fff589312c62fcaf360abd8d12
refs/heads/master: ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4
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_EXYNOS
select PINCTRL_EXYNOS4
select USE_OF
help
Machine support for Samsung Exynos4 machine with device tree enabled.
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -2062,8 +2062,7 @@ static void virtcons_remove(struct virtio_device *vdev)
/* Disable interrupts for vqs */
vdev->config->reset(vdev);
/* Finish up work that's lined up */
if (use_multiport(portdev))
cancel_work_sync(&portdev->control_work);
cancel_work_sync(&portdev->control_work);

list_for_each_entry_safe(port, port2, &portdev->ports, list)
unplug_port(port);
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/gpu/drm/ttm/ttm_bo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
struct ttm_bo_device *bdev = bo->bdev;
struct ttm_bo_driver *driver = bdev->driver;

fbo = kzalloc(sizeof(*fbo), GFP_KERNEL);
fbo = kmalloc(sizeof(*fbo), GFP_KERNEL);
if (!fbo)
return -ENOMEM;

Expand All @@ -448,7 +448,12 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
fbo->vm_node = NULL;
atomic_set(&fbo->cpu_writers, 0);

fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj);
spin_lock(&bdev->fence_lock);
if (bo->sync_obj)
fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj);
else
fbo->sync_obj = NULL;
spin_unlock(&bdev->fence_lock);
kref_init(&fbo->list_kref);
kref_init(&fbo->kref);
fbo->destroy = &ttm_transfered_destroy;
Expand Down Expand Up @@ -661,13 +666,11 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
*/

set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);

/* ttm_buffer_object_transfer accesses bo->sync_obj */
ret = ttm_buffer_object_transfer(bo, &ghost_obj);
spin_unlock(&bdev->fence_lock);
if (tmp_obj)
driver->sync_obj_unref(&tmp_obj);

ret = ttm_buffer_object_transfer(bo, &ghost_obj);
if (ret)
return ret;

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

qpp = &dev->qp_table[n];
for (; (q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock))) != NULL;
qpp = &q->next)
q = rcu_dereference_protected(*qpp,
lockdep_is_held(&dev->qpt_lock));
for (; q; 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,9 +741,6 @@ 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 @@ -755,6 +752,9 @@ 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,9 +600,6 @@ 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 @@ -618,6 +615,9 @@ 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->caps.flags &
if ((dev_cap->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_EXYNOS
bool "Pinctrl driver data for Samsung EXYNOS SoCs"
config PINCTRL_EXYNOS4
bool "Pinctrl driver data for Exynos4 SoC"
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_EXYNOS) += pinctrl-exynos.o
obj-$(CONFIG_PINCTRL_EXYNOS4) += 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: 0 additions & 18 deletions trunk/drivers/pinctrl/pinctrl-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,22 +1246,6 @@ 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 @@ -1752,8 +1736,6 @@ 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: 7 additions & 8 deletions trunk/drivers/regulator/max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,9 @@ static struct regulator_desc regulators[] = {
};

#ifdef CONFIG_OF
static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
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 @@ -391,15 +390,15 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
pmic_np = iodev->dev->of_node;
regulators_np = of_find_node_by_name(pmic_np, "voltage-regulators");
if (!regulators_np) {
dev_err(&pdev->dev, "could not find regulators sub-node\n");
dev_err(iodev->dev, "could not find regulators sub-node\n");
return -EINVAL;
}

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

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

ret = of_regulator_match(&pdev->dev, regulators, max8907_matches,
ret = of_regulator_match(pdev->dev.parent, 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: 20 additions & 19 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 platform_device *pdev,
static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev,
struct max8997_platform_data *pdata,
struct device_node *pmic_np)
{
Expand All @@ -944,31 +944,30 @@ static int max8997_pmic_dt_parse_dvs_gpio(struct platform_device *pdev,
gpio = of_get_named_gpio(pmic_np,
"max8997,pmic-buck125-dvs-gpios", i);
if (!gpio_is_valid(gpio)) {
dev_err(&pdev->dev, "invalid gpio[%d]: %d\n", i, gpio);
dev_err(iodev->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 platform_device *pdev,
static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
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(&pdev->dev, "could not find pmic sub-node\n");
dev_err(iodev->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(&pdev->dev, "could not find regulators sub-node\n");
dev_err(iodev->dev, "could not find regulators sub-node\n");
return -EINVAL;
}

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

rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
rdata = devm_kzalloc(iodev->dev, sizeof(*rdata) *
pdata->num_regulators, GFP_KERNEL);
if (!rdata) {
dev_err(&pdev->dev, "could not allocate memory for regulator data\n");
dev_err(iodev->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 platform_device *pdev,
break;

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

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

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

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

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

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

if (iodev->dev->of_node) {
ret = max8997_pmic_dt_parse_pdata(pdev, pdata);
ret = max8997_pmic_dt_parse_pdata(iodev, pdata);
if (ret)
return ret;
}
Expand Down
Loading

0 comments on commit c79e0bb

Please sign in to comment.