Skip to content

Commit b011561

Browse files
committed
ASoC: atmel: one fix and one cleanup
Merge series from Claudiu Beznea <[email protected]>: Hi, The series adds one fix for mchp-spdifrx and one cleanups for mchp-spdifrx and mchp-spdifrx drivers. Thank you, Claudiu Beznea Changes in v3: - changed cover letter title s/few/one, s/cleanups/cleanup - fix compilation error and warnings - keep only patch 1/5 and patch 3/5 from previous version as the rest of them were integrated Changes in v2: - s/tag/tab in the title of patch 2/5 Claudiu Beznea (2): ASoC: mchp-spdifrx: disable end of block interrupt on failures ASoC: mchp-spdiftx: remove references to mchp_i2s_caps sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- sound/soc/atmel/mchp-spdiftx.c | 8 -------- 2 files changed, 6 insertions(+), 11 deletions(-) -- 2.34.1
2 parents abed2ba + 403fcb5 commit b011561

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

sound/soc/atmel/mchp-spdifrx.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev)
288288
spin_unlock_irqrestore(&dev->blockend_lock, flags);
289289
}
290290

291-
/* called from atomic context only */
291+
/* called from atomic/non-atomic context */
292292
static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev)
293293
{
294-
spin_lock(&dev->blockend_lock);
294+
unsigned long flags;
295+
296+
spin_lock_irqsave(&dev->blockend_lock, flags);
295297
dev->blockend_refcount--;
296298
/* don't enable BLOCKEND interrupt if it's already enabled */
297299
if (dev->blockend_refcount == 0)
298300
regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND);
299-
spin_unlock(&dev->blockend_lock);
301+
spin_unlock_irqrestore(&dev->blockend_lock, flags);
300302
}
301303

302304
static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id)
@@ -575,6 +577,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev,
575577
if (ret <= 0) {
576578
dev_dbg(dev->dev, "user data for channel %d timeout\n",
577579
channel);
580+
mchp_spdifrx_isr_blockend_dis(dev);
578581
return ret;
579582
}
580583

sound/soc/atmel/mchp-spdiftx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ struct mchp_spdiftx_dev {
196196
struct clk *pclk;
197197
struct clk *gclk;
198198
unsigned int fmt;
199-
const struct mchp_i2s_caps *caps;
200199
int gclk_enabled:1;
201200
};
202201

@@ -765,8 +764,6 @@ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids);
765764

766765
static int mchp_spdiftx_probe(struct platform_device *pdev)
767766
{
768-
struct device_node *np = pdev->dev.of_node;
769-
const struct of_device_id *match;
770767
struct mchp_spdiftx_dev *dev;
771768
struct resource *mem;
772769
struct regmap *regmap;
@@ -780,11 +777,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
780777
if (!dev)
781778
return -ENOMEM;
782779

783-
/* Get hardware capabilities. */
784-
match = of_match_node(mchp_spdiftx_dt_ids, np);
785-
if (match)
786-
dev->caps = match->data;
787-
788780
/* Map I/O registers. */
789781
base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
790782
if (IS_ERR(base))

0 commit comments

Comments
 (0)