diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/char/virtio_console.c | 3 | ||||
| -rw-r--r-- | drivers/infiniband/hw/qib/qib_qp.c | 11 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 6 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 2 | ||||
| -rw-r--r-- | drivers/pinctrl/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/pinctrl/Makefile | 2 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-sirf.c | 18 | ||||
| -rw-r--r-- | drivers/regulator/max77686.c | 15 | ||||
| -rw-r--r-- | drivers/regulator/max8907-regulator.c | 3 | ||||
| -rw-r--r-- | drivers/regulator/max8997.c | 39 | ||||
| -rw-r--r-- | drivers/regulator/max8998.c | 2 | ||||
| -rw-r--r-- | drivers/regulator/of_regulator.c | 6 | ||||
| -rw-r--r-- | drivers/regulator/s2mps11.c | 4 | ||||
| -rw-r--r-- | drivers/regulator/tps65217-regulator.c | 4 | ||||
| -rw-r--r-- | drivers/regulator/tps65910-regulator.c | 2 | ||||
| -rw-r--r-- | drivers/xen/events.c | 4 | ||||
| -rw-r--r-- | drivers/xen/xen-pciback/pciback_ops.c | 14 |
18 files changed, 82 insertions, 63 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 684b0d53764f..ee4dbeafb377 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
| @@ -2062,7 +2062,8 @@ static void virtcons_remove(struct virtio_device *vdev) | |||
| 2062 | /* Disable interrupts for vqs */ | 2062 | /* Disable interrupts for vqs */ |
| 2063 | vdev->config->reset(vdev); | 2063 | vdev->config->reset(vdev); |
| 2064 | /* Finish up work that's lined up */ | 2064 | /* Finish up work that's lined up */ |
| 2065 | cancel_work_sync(&portdev->control_work); | 2065 | if (use_multiport(portdev)) |
| 2066 | cancel_work_sync(&portdev->control_work); | ||
| 2066 | 2067 | ||
| 2067 | list_for_each_entry_safe(port, port2, &portdev->ports, list) | 2068 | list_for_each_entry_safe(port, port2, &portdev->ports, list) |
| 2068 | unplug_port(port); | 2069 | unplug_port(port); |
diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c index 4850d03870c2..35275099cafd 100644 --- a/drivers/infiniband/hw/qib/qib_qp.c +++ b/drivers/infiniband/hw/qib/qib_qp.c | |||
| @@ -263,20 +263,15 @@ static void remove_qp(struct qib_ibdev *dev, struct qib_qp *qp) | |||
| 263 | struct qib_qp __rcu **qpp; | 263 | struct qib_qp __rcu **qpp; |
| 264 | 264 | ||
| 265 | qpp = &dev->qp_table[n]; | 265 | qpp = &dev->qp_table[n]; |
| 266 | q = rcu_dereference_protected(*qpp, | 266 | for (; (q = rcu_dereference_protected(*qpp, |
| 267 | lockdep_is_held(&dev->qpt_lock)); | 267 | lockdep_is_held(&dev->qpt_lock))) != NULL; |
| 268 | for (; q; qpp = &q->next) { | 268 | qpp = &q->next) |
| 269 | if (q == qp) { | 269 | if (q == qp) { |
| 270 | atomic_dec(&qp->refcount); | 270 | atomic_dec(&qp->refcount); |
| 271 | *qpp = qp->next; | 271 | *qpp = qp->next; |
| 272 | rcu_assign_pointer(qp->next, NULL); | 272 | rcu_assign_pointer(qp->next, NULL); |
| 273 | q = rcu_dereference_protected(*qpp, | ||
| 274 | lockdep_is_held(&dev->qpt_lock)); | ||
| 275 | break; | 273 | break; |
| 276 | } | 274 | } |
| 277 | q = rcu_dereference_protected(*qpp, | ||
| 278 | lockdep_is_held(&dev->qpt_lock)); | ||
| 279 | } | ||
| 280 | } | 275 | } |
| 281 | 276 | ||
| 282 | spin_unlock_irqrestore(&dev->qpt_lock, flags); | 277 | spin_unlock_irqrestore(&dev->qpt_lock, flags); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 03103d2bd641..67b0c1d23678 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
| @@ -741,6 +741,9 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_ | |||
| 741 | 741 | ||
| 742 | tx_req->mapping = addr; | 742 | tx_req->mapping = addr; |
| 743 | 743 | ||
| 744 | skb_orphan(skb); | ||
| 745 | skb_dst_drop(skb); | ||
| 746 | |||
| 744 | rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), | 747 | rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), |
| 745 | addr, skb->len); | 748 | addr, skb->len); |
| 746 | if (unlikely(rc)) { | 749 | if (unlikely(rc)) { |
| @@ -752,9 +755,6 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_ | |||
| 752 | dev->trans_start = jiffies; | 755 | dev->trans_start = jiffies; |
| 753 | ++tx->tx_head; | 756 | ++tx->tx_head; |
| 754 | 757 | ||
| 755 | skb_orphan(skb); | ||
| 756 | skb_dst_drop(skb); | ||
| 757 | |||
| 758 | if (++priv->tx_outstanding == ipoib_sendq_size) { | 758 | if (++priv->tx_outstanding == ipoib_sendq_size) { |
| 759 | ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n", | 759 | ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n", |
| 760 | tx->qp->qp_num); | 760 | tx->qp->qp_num); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index a1bca70e20aa..2cfa76f5d99e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
| @@ -600,6 +600,9 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb, | |||
| 600 | netif_stop_queue(dev); | 600 | netif_stop_queue(dev); |
| 601 | } | 601 | } |
| 602 | 602 | ||
| 603 | skb_orphan(skb); | ||
| 604 | skb_dst_drop(skb); | ||
| 605 | |||
| 603 | rc = post_send(priv, priv->tx_head & (ipoib_sendq_size - 1), | 606 | rc = post_send(priv, priv->tx_head & (ipoib_sendq_size - 1), |
| 604 | address->ah, qpn, tx_req, phead, hlen); | 607 | address->ah, qpn, tx_req, phead, hlen); |
| 605 | if (unlikely(rc)) { | 608 | if (unlikely(rc)) { |
| @@ -615,9 +618,6 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb, | |||
| 615 | 618 | ||
| 616 | address->last_send = priv->tx_head; | 619 | address->last_send = priv->tx_head; |
| 617 | ++priv->tx_head; | 620 | ++priv->tx_head; |
| 618 | |||
| 619 | skb_orphan(skb); | ||
| 620 | skb_dst_drop(skb); | ||
| 621 | } | 621 | } |
| 622 | 622 | ||
| 623 | if (unlikely(priv->tx_outstanding > MAX_SEND_CQE)) | 623 | if (unlikely(priv->tx_outstanding > MAX_SEND_CQE)) |
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index a6542d75374c..5163af314990 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
| @@ -380,7 +380,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
| 380 | } | 380 | } |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | if ((dev_cap->flags & | 383 | if ((dev->caps.flags & |
| 384 | (MLX4_DEV_CAP_FLAG_64B_CQE | MLX4_DEV_CAP_FLAG_64B_EQE)) && | 384 | (MLX4_DEV_CAP_FLAG_64B_CQE | MLX4_DEV_CAP_FLAG_64B_EQE)) && |
| 385 | mlx4_is_master(dev)) | 385 | mlx4_is_master(dev)) |
| 386 | dev->caps.function_caps |= MLX4_FUNC_CAP_64B_EQE_CQE; | 386 | dev->caps.function_caps |= MLX4_FUNC_CAP_64B_EQE_CQE; |
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index efaecefe3f8c..a5f3c8ca480e 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
| @@ -184,8 +184,8 @@ config PINCTRL_SAMSUNG | |||
| 184 | select PINMUX | 184 | select PINMUX |
| 185 | select PINCONF | 185 | select PINCONF |
| 186 | 186 | ||
| 187 | config PINCTRL_EXYNOS4 | 187 | config PINCTRL_EXYNOS |
| 188 | bool "Pinctrl driver data for Exynos4 SoC" | 188 | bool "Pinctrl driver data for Samsung EXYNOS SoCs" |
| 189 | depends on OF && GPIOLIB | 189 | depends on OF && GPIOLIB |
| 190 | select PINCTRL_SAMSUNG | 190 | select PINCTRL_SAMSUNG |
| 191 | 191 | ||
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index fc4606f27dc7..6e87e52eab5d 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile | |||
| @@ -36,7 +36,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o | |||
| 36 | obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o | 36 | obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o |
| 37 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o | 37 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o |
| 38 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o | 38 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o |
| 39 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o | 39 | obj-$(CONFIG_PINCTRL_EXYNOS) += pinctrl-exynos.o |
| 40 | obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o | 40 | obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o |
| 41 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o | 41 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o |
| 42 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o | 42 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o |
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 498b2ba905de..d02498b30c6e 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c | |||
| @@ -1246,6 +1246,22 @@ static void __iomem *sirfsoc_rsc_of_iomap(void) | |||
| 1246 | return of_iomap(np, 0); | 1246 | return of_iomap(np, 0); |
| 1247 | } | 1247 | } |
| 1248 | 1248 | ||
| 1249 | static int sirfsoc_gpio_of_xlate(struct gpio_chip *gc, | ||
| 1250 | const struct of_phandle_args *gpiospec, | ||
| 1251 | u32 *flags) | ||
| 1252 | { | ||
| 1253 | if (gpiospec->args[0] > SIRFSOC_GPIO_NO_OF_BANKS * SIRFSOC_GPIO_BANK_SIZE) | ||
| 1254 | return -EINVAL; | ||
| 1255 | |||
| 1256 | if (gc != &sgpio_bank[gpiospec->args[0] / SIRFSOC_GPIO_BANK_SIZE].chip.gc) | ||
| 1257 | return -EINVAL; | ||
| 1258 | |||
| 1259 | if (flags) | ||
| 1260 | *flags = gpiospec->args[1]; | ||
| 1261 | |||
| 1262 | return gpiospec->args[0] % SIRFSOC_GPIO_BANK_SIZE; | ||
| 1263 | } | ||
| 1264 | |||
| 1249 | static int sirfsoc_pinmux_probe(struct platform_device *pdev) | 1265 | static int sirfsoc_pinmux_probe(struct platform_device *pdev) |
| 1250 | { | 1266 | { |
| 1251 | int ret; | 1267 | int ret; |
| @@ -1736,6 +1752,8 @@ static int sirfsoc_gpio_probe(struct device_node *np) | |||
| 1736 | bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE; | 1752 | bank->chip.gc.ngpio = SIRFSOC_GPIO_BANK_SIZE; |
| 1737 | bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL); | 1753 | bank->chip.gc.label = kstrdup(np->full_name, GFP_KERNEL); |
| 1738 | bank->chip.gc.of_node = np; | 1754 | bank->chip.gc.of_node = np; |
| 1755 | bank->chip.gc.of_xlate = sirfsoc_gpio_of_xlate; | ||
| 1756 | bank->chip.gc.of_gpio_n_cells = 2; | ||
| 1739 | bank->chip.regs = regs; | 1757 | bank->chip.regs = regs; |
| 1740 | bank->id = i; | 1758 | bank->id = i; |
| 1741 | bank->is_marco = is_marco; | 1759 | bank->is_marco = is_marco; |
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index b85040caaea3..cca18a3c0294 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c | |||
| @@ -379,9 +379,10 @@ static struct regulator_desc regulators[] = { | |||
| 379 | }; | 379 | }; |
| 380 | 380 | ||
| 381 | #ifdef CONFIG_OF | 381 | #ifdef CONFIG_OF |
| 382 | static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, | 382 | static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev, |
| 383 | struct max77686_platform_data *pdata) | 383 | struct max77686_platform_data *pdata) |
| 384 | { | 384 | { |
| 385 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); | ||
| 385 | struct device_node *pmic_np, *regulators_np; | 386 | struct device_node *pmic_np, *regulators_np; |
| 386 | struct max77686_regulator_data *rdata; | 387 | struct max77686_regulator_data *rdata; |
| 387 | struct of_regulator_match rmatch; | 388 | struct of_regulator_match rmatch; |
| @@ -390,15 +391,15 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, | |||
| 390 | pmic_np = iodev->dev->of_node; | 391 | pmic_np = iodev->dev->of_node; |
| 391 | regulators_np = of_find_node_by_name(pmic_np, "voltage-regulators"); | 392 | regulators_np = of_find_node_by_name(pmic_np, "voltage-regulators"); |
| 392 | if (!regulators_np) { | 393 | if (!regulators_np) { |
| 393 | dev_err(iodev->dev, "could not find regulators sub-node\n"); | 394 | dev_err(&pdev->dev, "could not find regulators sub-node\n"); |
| 394 | return -EINVAL; | 395 | return -EINVAL; |
| 395 | } | 396 | } |
| 396 | 397 | ||
| 397 | pdata->num_regulators = ARRAY_SIZE(regulators); | 398 | pdata->num_regulators = ARRAY_SIZE(regulators); |
| 398 | rdata = devm_kzalloc(iodev->dev, sizeof(*rdata) * | 399 | rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) * |
| 399 | pdata->num_regulators, GFP_KERNEL); | 400 | pdata->num_regulators, GFP_KERNEL); |
| 400 | if (!rdata) { | 401 | if (!rdata) { |
| 401 | dev_err(iodev->dev, | 402 | dev_err(&pdev->dev, |
| 402 | "could not allocate memory for regulator data\n"); | 403 | "could not allocate memory for regulator data\n"); |
| 403 | return -ENOMEM; | 404 | return -ENOMEM; |
| 404 | } | 405 | } |
| @@ -407,7 +408,7 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, | |||
| 407 | rmatch.name = regulators[i].name; | 408 | rmatch.name = regulators[i].name; |
| 408 | rmatch.init_data = NULL; | 409 | rmatch.init_data = NULL; |
| 409 | rmatch.of_node = NULL; | 410 | rmatch.of_node = NULL; |
| 410 | of_regulator_match(iodev->dev, regulators_np, &rmatch, 1); | 411 | of_regulator_match(&pdev->dev, regulators_np, &rmatch, 1); |
| 411 | rdata[i].initdata = rmatch.init_data; | 412 | rdata[i].initdata = rmatch.init_data; |
| 412 | rdata[i].of_node = rmatch.of_node; | 413 | rdata[i].of_node = rmatch.of_node; |
| 413 | } | 414 | } |
| @@ -417,7 +418,7 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, | |||
| 417 | return 0; | 418 | return 0; |
| 418 | } | 419 | } |
| 419 | #else | 420 | #else |
| 420 | static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev, | 421 | static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev, |
| 421 | struct max77686_platform_data *pdata) | 422 | struct max77686_platform_data *pdata) |
| 422 | { | 423 | { |
| 423 | return 0; | 424 | return 0; |
| @@ -440,7 +441,7 @@ static int max77686_pmic_probe(struct platform_device *pdev) | |||
| 440 | } | 441 | } |
| 441 | 442 | ||
| 442 | if (iodev->dev->of_node) { | 443 | if (iodev->dev->of_node) { |
| 443 | ret = max77686_pmic_dt_parse_pdata(iodev, pdata); | 444 | ret = max77686_pmic_dt_parse_pdata(pdev, pdata); |
| 444 | if (ret) | 445 | if (ret) |
| 445 | return ret; | 446 | return ret; |
| 446 | } | 447 | } |
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index d1a77512d83e..d40cf7fdb546 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c | |||
| @@ -237,8 +237,7 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev) | |||
| 237 | return -EINVAL; | 237 | return -EINVAL; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | ret = of_regulator_match(pdev->dev.parent, regulators, | 240 | ret = of_regulator_match(&pdev->dev, regulators, max8907_matches, |
| 241 | max8907_matches, | ||
| 242 | ARRAY_SIZE(max8907_matches)); | 241 | ARRAY_SIZE(max8907_matches)); |
| 243 | if (ret < 0) { | 242 | if (ret < 0) { |
| 244 | dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", | 243 | dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", |
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 02be7fcae32f..836908ce505e 100644 --- a/drivers/regulator/max8997.c +++ b/drivers/regulator/max8997.c | |||
| @@ -934,7 +934,7 @@ static struct regulator_desc regulators[] = { | |||
| 934 | }; | 934 | }; |
| 935 | 935 | ||
| 936 | #ifdef CONFIG_OF | 936 | #ifdef CONFIG_OF |
| 937 | static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev, | 937 | static int max8997_pmic_dt_parse_dvs_gpio(struct platform_device *pdev, |
| 938 | struct max8997_platform_data *pdata, | 938 | struct max8997_platform_data *pdata, |
| 939 | struct device_node *pmic_np) | 939 | struct device_node *pmic_np) |
| 940 | { | 940 | { |
| @@ -944,7 +944,7 @@ static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev, | |||
| 944 | gpio = of_get_named_gpio(pmic_np, | 944 | gpio = of_get_named_gpio(pmic_np, |
| 945 | "max8997,pmic-buck125-dvs-gpios", i); | 945 | "max8997,pmic-buck125-dvs-gpios", i); |
| 946 | if (!gpio_is_valid(gpio)) { | 946 | if (!gpio_is_valid(gpio)) { |
| 947 | dev_err(iodev->dev, "invalid gpio[%d]: %d\n", i, gpio); | 947 | dev_err(&pdev->dev, "invalid gpio[%d]: %d\n", i, gpio); |
| 948 | return -EINVAL; | 948 | return -EINVAL; |
| 949 | } | 949 | } |
| 950 | pdata->buck125_gpios[i] = gpio; | 950 | pdata->buck125_gpios[i] = gpio; |
| @@ -952,22 +952,23 @@ static int max8997_pmic_dt_parse_dvs_gpio(struct max8997_dev *iodev, | |||
| 952 | return 0; | 952 | return 0; |
| 953 | } | 953 | } |
| 954 | 954 | ||
| 955 | static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | 955 | static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, |
| 956 | struct max8997_platform_data *pdata) | 956 | struct max8997_platform_data *pdata) |
| 957 | { | 957 | { |
| 958 | struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent); | ||
| 958 | struct device_node *pmic_np, *regulators_np, *reg_np; | 959 | struct device_node *pmic_np, *regulators_np, *reg_np; |
| 959 | struct max8997_regulator_data *rdata; | 960 | struct max8997_regulator_data *rdata; |
| 960 | unsigned int i, dvs_voltage_nr = 1, ret; | 961 | unsigned int i, dvs_voltage_nr = 1, ret; |
| 961 | 962 | ||
| 962 | pmic_np = iodev->dev->of_node; | 963 | pmic_np = iodev->dev->of_node; |
| 963 | if (!pmic_np) { | 964 | if (!pmic_np) { |
| 964 | dev_err(iodev->dev, "could not find pmic sub-node\n"); | 965 | dev_err(&pdev->dev, "could not find pmic sub-node\n"); |
| 965 | return -ENODEV; | 966 | return -ENODEV; |
| 966 | } | 967 | } |
| 967 | 968 | ||
| 968 | regulators_np = of_find_node_by_name(pmic_np, "regulators"); | 969 | regulators_np = of_find_node_by_name(pmic_np, "regulators"); |
| 969 | if (!regulators_np) { | 970 | if (!regulators_np) { |
| 970 | dev_err(iodev->dev, "could not find regulators sub-node\n"); | 971 | dev_err(&pdev->dev, "could not find regulators sub-node\n"); |
| 971 | return -EINVAL; | 972 | return -EINVAL; |
| 972 | } | 973 | } |
| 973 | 974 | ||
| @@ -976,11 +977,10 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | |||
| 976 | for_each_child_of_node(regulators_np, reg_np) | 977 | for_each_child_of_node(regulators_np, reg_np) |
| 977 | pdata->num_regulators++; | 978 | pdata->num_regulators++; |
| 978 | 979 | ||
| 979 | rdata = devm_kzalloc(iodev->dev, sizeof(*rdata) * | 980 | rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) * |
| 980 | pdata->num_regulators, GFP_KERNEL); | 981 | pdata->num_regulators, GFP_KERNEL); |
| 981 | if (!rdata) { | 982 | if (!rdata) { |
| 982 | dev_err(iodev->dev, "could not allocate memory for " | 983 | dev_err(&pdev->dev, "could not allocate memory for regulator data\n"); |
| 983 | "regulator data\n"); | ||
| 984 | return -ENOMEM; | 984 | return -ENOMEM; |
| 985 | } | 985 | } |
| 986 | 986 | ||
| @@ -991,14 +991,14 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | |||
| 991 | break; | 991 | break; |
| 992 | 992 | ||
| 993 | if (i == ARRAY_SIZE(regulators)) { | 993 | if (i == ARRAY_SIZE(regulators)) { |
| 994 | dev_warn(iodev->dev, "don't know how to configure " | 994 | dev_warn(&pdev->dev, "don't know how to configure regulator %s\n", |
| 995 | "regulator %s\n", reg_np->name); | 995 | reg_np->name); |
| 996 | continue; | 996 | continue; |
| 997 | } | 997 | } |
| 998 | 998 | ||
| 999 | rdata->id = i; | 999 | rdata->id = i; |
| 1000 | rdata->initdata = of_get_regulator_init_data( | 1000 | rdata->initdata = of_get_regulator_init_data(&pdev->dev, |
| 1001 | iodev->dev, reg_np); | 1001 | reg_np); |
| 1002 | rdata->reg_node = reg_np; | 1002 | rdata->reg_node = reg_np; |
| 1003 | rdata++; | 1003 | rdata++; |
| 1004 | } | 1004 | } |
| @@ -1014,7 +1014,7 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | |||
| 1014 | 1014 | ||
| 1015 | if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs || | 1015 | if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs || |
| 1016 | pdata->buck5_gpiodvs) { | 1016 | pdata->buck5_gpiodvs) { |
| 1017 | ret = max8997_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np); | 1017 | ret = max8997_pmic_dt_parse_dvs_gpio(pdev, pdata, pmic_np); |
| 1018 | if (ret) | 1018 | if (ret) |
| 1019 | return -EINVAL; | 1019 | return -EINVAL; |
| 1020 | 1020 | ||
| @@ -1025,8 +1025,7 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | |||
| 1025 | } else { | 1025 | } else { |
| 1026 | if (pdata->buck125_default_idx >= 8) { | 1026 | if (pdata->buck125_default_idx >= 8) { |
| 1027 | pdata->buck125_default_idx = 0; | 1027 | pdata->buck125_default_idx = 0; |
| 1028 | dev_info(iodev->dev, "invalid value for " | 1028 | dev_info(&pdev->dev, "invalid value for default dvs index, using 0 instead\n"); |
| 1029 | "default dvs index, using 0 instead\n"); | ||
| 1030 | } | 1029 | } |
| 1031 | } | 1030 | } |
| 1032 | 1031 | ||
| @@ -1040,28 +1039,28 @@ static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | |||
| 1040 | if (of_property_read_u32_array(pmic_np, | 1039 | if (of_property_read_u32_array(pmic_np, |
| 1041 | "max8997,pmic-buck1-dvs-voltage", | 1040 | "max8997,pmic-buck1-dvs-voltage", |
| 1042 | pdata->buck1_voltage, dvs_voltage_nr)) { | 1041 | pdata->buck1_voltage, dvs_voltage_nr)) { |
| 1043 | dev_err(iodev->dev, "buck1 voltages not specified\n"); | 1042 | dev_err(&pdev->dev, "buck1 voltages not specified\n"); |
| 1044 | return -EINVAL; | 1043 | return -EINVAL; |
| 1045 | } | 1044 | } |
| 1046 | 1045 | ||
| 1047 | if (of_property_read_u32_array(pmic_np, | 1046 | if (of_property_read_u32_array(pmic_np, |
| 1048 | "max8997,pmic-buck2-dvs-voltage", | 1047 | "max8997,pmic-buck2-dvs-voltage", |
| 1049 | pdata->buck2_voltage, dvs_voltage_nr)) { | 1048 | pdata->buck2_voltage, dvs_voltage_nr)) { |
| 1050 | dev_err(iodev->dev, "buck2 voltages not specified\n"); | 1049 | dev_err(&pdev->dev, "buck2 voltages not specified\n"); |
| 1051 | return -EINVAL; | 1050 | return -EINVAL; |
| 1052 | } | 1051 | } |
| 1053 | 1052 | ||
| 1054 | if (of_property_read_u32_array(pmic_np, | 1053 | if (of_property_read_u32_array(pmic_np, |
| 1055 | "max8997,pmic-buck5-dvs-voltage", | 1054 | "max8997,pmic-buck5-dvs-voltage", |
| 1056 | pdata->buck5_voltage, dvs_voltage_nr)) { | 1055 | pdata->buck5_voltage, dvs_voltage_nr)) { |
| 1057 | dev_err(iodev->dev, "buck5 voltages not specified\n"); | 1056 | dev_err(&pdev->dev, "buck5 voltages not specified\n"); |
| 1058 | return -EINVAL; | 1057 | return -EINVAL; |
| 1059 | } | 1058 | } |
| 1060 | 1059 | ||
| 1061 | return 0; | 1060 | return 0; |
| 1062 | } | 1061 | } |
| 1063 | #else | 1062 | #else |
| 1064 | static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev, | 1063 | static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, |
| 1065 | struct max8997_platform_data *pdata) | 1064 | struct max8997_platform_data *pdata) |
| 1066 | { | 1065 | { |
| 1067 | return 0; | 1066 | return 0; |
| @@ -1085,7 +1084,7 @@ static int max8997_pmic_probe(struct platform_device *pdev) | |||
| 1085 | } | 1084 | } |
| 1086 | 1085 | ||
| 1087 | if (iodev->dev->of_node) { | 1086 | if (iodev->dev->of_node) { |
| 1088 | ret = max8997_pmic_dt_parse_pdata(iodev, pdata); | 1087 | ret = max8997_pmic_dt_parse_pdata(pdev, pdata); |
| 1089 | if (ret) | 1088 | if (ret) |
| 1090 | return ret; | 1089 | return ret; |
| 1091 | } | 1090 | } |
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 1f0df4046b86..0a8dd1cbee6f 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c | |||
| @@ -65,7 +65,7 @@ static const struct voltage_map_desc ldo9_voltage_map_desc = { | |||
| 65 | .min = 2800000, .step = 100000, .max = 3100000, | 65 | .min = 2800000, .step = 100000, .max = 3100000, |
| 66 | }; | 66 | }; |
| 67 | static const struct voltage_map_desc ldo10_voltage_map_desc = { | 67 | static const struct voltage_map_desc ldo10_voltage_map_desc = { |
| 68 | .min = 95000, .step = 50000, .max = 1300000, | 68 | .min = 950000, .step = 50000, .max = 1300000, |
| 69 | }; | 69 | }; |
| 70 | static const struct voltage_map_desc ldo1213_voltage_map_desc = { | 70 | static const struct voltage_map_desc ldo1213_voltage_map_desc = { |
| 71 | .min = 800000, .step = 100000, .max = 3300000, | 71 | .min = 800000, .step = 100000, .max = 3300000, |
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 6f684916fd79..66ca769287ab 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c | |||
| @@ -120,6 +120,12 @@ int of_regulator_match(struct device *dev, struct device_node *node, | |||
| 120 | if (!dev || !node) | 120 | if (!dev || !node) |
| 121 | return -EINVAL; | 121 | return -EINVAL; |
| 122 | 122 | ||
| 123 | for (i = 0; i < num_matches; i++) { | ||
| 124 | struct of_regulator_match *match = &matches[i]; | ||
| 125 | match->init_data = NULL; | ||
| 126 | match->of_node = NULL; | ||
| 127 | } | ||
| 128 | |||
| 123 | for_each_child_of_node(node, child) { | 129 | for_each_child_of_node(node, child) { |
| 124 | name = of_get_property(child, | 130 | name = of_get_property(child, |
| 125 | "regulator-compatible", NULL); | 131 | "regulator-compatible", NULL); |
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index bd062a2ffbe2..cd9ea2ea1826 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
| @@ -174,9 +174,9 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
| 174 | .min_uV = S2MPS11_BUCK_MIN2, \ | 174 | .min_uV = S2MPS11_BUCK_MIN2, \ |
| 175 | .uV_step = S2MPS11_BUCK_STEP2, \ | 175 | .uV_step = S2MPS11_BUCK_STEP2, \ |
| 176 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ | 176 | .n_voltages = S2MPS11_BUCK_N_VOLTAGES, \ |
| 177 | .vsel_reg = S2MPS11_REG_B9CTRL2, \ | 177 | .vsel_reg = S2MPS11_REG_B10CTRL2, \ |
| 178 | .vsel_mask = S2MPS11_BUCK_VSEL_MASK, \ | 178 | .vsel_mask = S2MPS11_BUCK_VSEL_MASK, \ |
| 179 | .enable_reg = S2MPS11_REG_B9CTRL1, \ | 179 | .enable_reg = S2MPS11_REG_B10CTRL1, \ |
| 180 | .enable_mask = S2MPS11_ENABLE_MASK \ | 180 | .enable_mask = S2MPS11_ENABLE_MASK \ |
| 181 | } | 181 | } |
| 182 | 182 | ||
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index 73dce7664126..df395187c063 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c | |||
| @@ -305,8 +305,8 @@ static struct tps65217_board *tps65217_parse_dt(struct platform_device *pdev) | |||
| 305 | if (!regs) | 305 | if (!regs) |
| 306 | return NULL; | 306 | return NULL; |
| 307 | 307 | ||
| 308 | count = of_regulator_match(pdev->dev.parent, regs, | 308 | count = of_regulator_match(&pdev->dev, regs, reg_matches, |
| 309 | reg_matches, TPS65217_NUM_REGULATOR); | 309 | TPS65217_NUM_REGULATOR); |
| 310 | of_node_put(regs); | 310 | of_node_put(regs); |
| 311 | if ((count < 0) || (count > TPS65217_NUM_REGULATOR)) | 311 | if ((count < 0) || (count > TPS65217_NUM_REGULATOR)) |
| 312 | return NULL; | 312 | return NULL; |
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 59c3770fa77d..b0e4c0bc85c3 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
| @@ -998,7 +998,7 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( | |||
| 998 | return NULL; | 998 | return NULL; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | ret = of_regulator_match(pdev->dev.parent, regulators, matches, count); | 1001 | ret = of_regulator_match(&pdev->dev, regulators, matches, count); |
| 1002 | if (ret < 0) { | 1002 | if (ret < 0) { |
| 1003 | dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", | 1003 | dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", |
| 1004 | ret); | 1004 | ret); |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 0be4df39e953..74d77dfa5f63 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) | |||
| 840 | 840 | ||
| 841 | if (irq == -1) { | 841 | if (irq == -1) { |
| 842 | irq = xen_allocate_irq_dynamic(); | 842 | irq = xen_allocate_irq_dynamic(); |
| 843 | if (irq == -1) | 843 | if (irq < 0) |
| 844 | goto out; | 844 | goto out; |
| 845 | 845 | ||
| 846 | irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, | 846 | irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, |
| @@ -944,7 +944,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu) | |||
| 944 | 944 | ||
| 945 | if (irq == -1) { | 945 | if (irq == -1) { |
| 946 | irq = xen_allocate_irq_dynamic(); | 946 | irq = xen_allocate_irq_dynamic(); |
| 947 | if (irq == -1) | 947 | if (irq < 0) |
| 948 | goto out; | 948 | goto out; |
| 949 | 949 | ||
| 950 | irq_set_chip_and_handler_name(irq, &xen_percpu_chip, | 950 | irq_set_chip_and_handler_name(irq, &xen_percpu_chip, |
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c index 97f5d264c31e..37c1f825f513 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c | |||
| @@ -135,7 +135,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, | |||
| 135 | struct pci_dev *dev, struct xen_pci_op *op) | 135 | struct pci_dev *dev, struct xen_pci_op *op) |
| 136 | { | 136 | { |
| 137 | struct xen_pcibk_dev_data *dev_data; | 137 | struct xen_pcibk_dev_data *dev_data; |
| 138 | int otherend = pdev->xdev->otherend_id; | ||
| 139 | int status; | 138 | int status; |
| 140 | 139 | ||
| 141 | if (unlikely(verbose_request)) | 140 | if (unlikely(verbose_request)) |
| @@ -144,8 +143,9 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, | |||
| 144 | status = pci_enable_msi(dev); | 143 | status = pci_enable_msi(dev); |
| 145 | 144 | ||
| 146 | if (status) { | 145 | if (status) { |
| 147 | printk(KERN_ERR "error enable msi for guest %x status %x\n", | 146 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n", |
| 148 | otherend, status); | 147 | pci_name(dev), pdev->xdev->otherend_id, |
| 148 | status); | ||
| 149 | op->value = 0; | 149 | op->value = 0; |
| 150 | return XEN_PCI_ERR_op_failed; | 150 | return XEN_PCI_ERR_op_failed; |
| 151 | } | 151 | } |
| @@ -223,10 +223,10 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev, | |||
| 223 | pci_name(dev), i, | 223 | pci_name(dev), i, |
| 224 | op->msix_entries[i].vector); | 224 | op->msix_entries[i].vector); |
| 225 | } | 225 | } |
| 226 | } else { | 226 | } else |
| 227 | printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n", | 227 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n", |
| 228 | pci_name(dev), result); | 228 | pci_name(dev), pdev->xdev->otherend_id, |
| 229 | } | 229 | result); |
| 230 | kfree(entries); | 230 | kfree(entries); |
| 231 | 231 | ||
| 232 | op->value = result; | 232 | op->value = result; |
