Ignore:
Timestamp:
Apr 21, 2025, 7:17:25 PM (4 months ago)
Author:
David Azarewicz
Message:

Merge from uniaud32-exp branch

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/pci/maestro3.c

    r772 r777  
    777777        unsigned int in_suspend;
    778778
    779 #ifdef CONFIG_PM_SLEEP
    780779        u16 *suspend_mem;
    781 #endif
    782780
    783781        const struct firmware *assp_kernel_image;
     
    23662364        }
    23672365
    2368 #ifdef CONFIG_PM_SLEEP
    23692366        vfree(chip->suspend_mem);
    2370 #endif
    23712367        release_firmware(chip->assp_kernel_image);
    23722368        release_firmware(chip->assp_minisrc_image);
     
    23772373 * APM support
    23782374 */
    2379 #ifdef CONFIG_PM_SLEEP
    23802375static int m3_suspend(struct device *dev)
    23812376{
     
    24512446}
    24522447
    2453 static SIMPLE_DEV_PM_OPS(m3_pm, m3_suspend, m3_resume);
    2454 #define M3_PM_OPS       &m3_pm
    2455 #else
    2456 #define M3_PM_OPS       NULL
    2457 #endif /* CONFIG_PM_SLEEP */
     2448static DEFINE_SIMPLE_DEV_PM_OPS(m3_pm, m3_suspend, m3_resume);
    24582449
    24592450#ifdef CONFIG_SND_MAESTRO3_INPUT
     
    25992590        card->sync_irq = chip->irq;
    26002591
    2601 #ifdef CONFIG_PM_SLEEP
     2592#ifndef TARGET_OS2
     2593        if (IS_ENABLED(CONFIG_PM_SLEEP)) {
    26022594        chip->suspend_mem =
    26032595                vmalloc(array_size(sizeof(u16),
    26042596                                   REV_B_CODE_MEMORY_LENGTH +
    26052597                                        REV_B_DATA_MEMORY_LENGTH));
    2606         if (chip->suspend_mem == NULL)
     2598                if (!chip->suspend_mem)
    26072599                dev_warn(card->dev, "can't allocate apm buffer\n");
     2600        }
    26082601#endif
    2609 
    26102602        err = snd_m3_mixer(chip);
    26112603        if (err < 0)
     
    27182710        .probe = snd_m3_probe,
    27192711        .driver = {
    2720                 .pm = M3_PM_OPS,
     2712                .pm = &m3_pm,
    27212713        },
    27222714};
Note: See TracChangeset for help on using the changeset viewer.