--- zzzz-none-000/linux-3.10.107/sound/pci/ctxfi/ctamixer.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/pci/ctxfi/ctamixer.c 2021-02-04 17:41:59.000000000 +0000 @@ -49,7 +49,7 @@ return (amixer_index(rsc) << 4) + 0x4; } -static struct rsc_ops amixer_basic_rsc_ops = { +static const struct rsc_ops amixer_basic_rsc_ops = { .master = amixer_master, .next_conj = amixer_next_conj, .index = amixer_index, @@ -186,7 +186,7 @@ return 0; } -static struct amixer_rsc_ops amixer_ops = { +static const struct amixer_rsc_ops amixer_ops = { .set_input = amixer_set_input, .set_invalid_squash = amixer_set_invalid_squash, .set_scale = amixer_set_y, @@ -258,7 +258,8 @@ } spin_unlock_irqrestore(&mgr->mgr_lock, flags); if (err) { - printk(KERN_ERR "ctxfi: Can't meet AMIXER resource request!\n"); + dev_err(mgr->card->dev, + "Can't meet AMIXER resource request!\n"); goto error; } @@ -296,7 +297,7 @@ return 0; } -int amixer_mgr_create(void *hw, struct amixer_mgr **ramixer_mgr) +int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr) { int err; struct amixer_mgr *amixer_mgr; @@ -314,6 +315,7 @@ amixer_mgr->get_amixer = get_amixer_rsc; amixer_mgr->put_amixer = put_amixer_rsc; + amixer_mgr->card = hw->card; *ramixer_mgr = amixer_mgr; @@ -355,7 +357,7 @@ return (sum_index(rsc) << 4) + 0xc; } -static struct rsc_ops sum_basic_rsc_ops = { +static const struct rsc_ops sum_basic_rsc_ops = { .master = sum_master, .next_conj = sum_next_conj, .index = sum_index, @@ -411,7 +413,8 @@ } spin_unlock_irqrestore(&mgr->mgr_lock, flags); if (err) { - printk(KERN_ERR "ctxfi: Can't meet SUM resource request!\n"); + dev_err(mgr->card->dev, + "Can't meet SUM resource request!\n"); goto error; } @@ -449,7 +452,7 @@ return 0; } -int sum_mgr_create(void *hw, struct sum_mgr **rsum_mgr) +int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr) { int err; struct sum_mgr *sum_mgr; @@ -467,6 +470,7 @@ sum_mgr->get_sum = get_sum_rsc; sum_mgr->put_sum = put_sum_rsc; + sum_mgr->card = hw->card; *rsum_mgr = sum_mgr;