Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: pm4125: Two minor fixes for

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

I marked these as fixes, but the issue is not likely to trigger in
normal conditions.

Not tested on hardware, please kindly provide tested-by, the best with
some probe bind/unbind cycle.

+14 -5
+14 -5
sound/soc/codecs/pm4125.c
··· 71 71 struct wcd_mbhc_intr intr_ids; 72 72 struct wcd_common common; 73 73 struct irq_domain *virq; 74 - const struct regmap_irq_chip *pm4125_regmap_irq_chip; 74 + const struct regmap_irq_chip *chip_desc; 75 75 struct regmap_irq_chip_data *irq_chip; 76 76 struct snd_soc_jack *jack; 77 77 unsigned long status_mask; ··· 177 177 PM4125_DIG_SWR_INTR_LEVEL_0, 178 178 }; 179 179 180 - static struct regmap_irq_chip pm4125_regmap_irq_chip = { 180 + static const struct regmap_irq_chip pm4125_regmap_irq_chip = { 181 181 .name = "pm4125", 182 182 .irqs = pm4125_irqs, 183 183 .num_irqs = ARRAY_SIZE(pm4125_irqs), ··· 1301 1301 return -EINVAL; 1302 1302 } 1303 1303 1304 - pm4125_regmap_irq_chip.irq_drv_data = pm4125; 1305 - 1306 1304 return devm_regmap_add_irq_chip(dev, pm4125->regmap, irq_create_mapping(pm4125->virq, 0), 1307 - IRQF_ONESHOT, 0, &pm4125_regmap_irq_chip, 1305 + IRQF_ONESHOT, 0, pm4125->chip_desc, 1308 1306 &pm4125->irq_chip); 1309 1307 } 1310 1308 ··· 1610 1612 struct pm4125_priv *pm4125 = dev_get_drvdata(dev); 1611 1613 1612 1614 snd_soc_unregister_component(dev); 1615 + devm_regmap_del_irq_chip(dev, irq_find_mapping(pm4125->virq, 0), 1616 + pm4125->irq_chip); 1613 1617 device_link_remove(dev, pm4125->txdev); 1614 1618 device_link_remove(dev, pm4125->rxdev); 1615 1619 device_link_remove(pm4125->rxdev, pm4125->txdev); ··· 1647 1647 { 1648 1648 struct component_match *match = NULL; 1649 1649 struct device *dev = &pdev->dev; 1650 + struct regmap_irq_chip *chip_desc; 1650 1651 struct pm4125_priv *pm4125; 1651 1652 struct wcd_mbhc_config *cfg; 1652 1653 int ret; ··· 1657 1656 return -ENOMEM; 1658 1657 1659 1658 dev_set_drvdata(dev, pm4125); 1659 + 1660 + chip_desc = devm_kmemdup(dev, &pm4125_regmap_irq_chip, 1661 + sizeof(pm4125_regmap_irq_chip), 1662 + GFP_KERNEL); 1663 + if (!chip_desc) 1664 + return -ENOMEM; 1665 + chip_desc->irq_drv_data = pm4125; 1666 + pm4125->chip_desc = chip_desc; 1660 1667 1661 1668 ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(pm4125_power_supplies), 1662 1669 pm4125_power_supplies);