Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-block.git] / sound / pci / hda / hda_controller.c
index 232a1926758aa07a027d9845d8b3ca16efccdc69..c8d1b4316245f3ac02ca0b25bbe6f63b66eceb02 100644 (file)
@@ -795,11 +795,11 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr,
 
        for (loopcounter = 0;; loopcounter++) {
                spin_lock_irq(&bus->reg_lock);
-               if (chip->polling_mode || do_poll)
+               if (bus->polling_mode || do_poll)
                        snd_hdac_bus_update_rirb(bus);
                if (!bus->rirb.cmds[addr]) {
                        if (!do_poll)
-                               chip->poll_count = 0;
+                               bus->poll_count = 0;
                        if (res)
                                *res = bus->rirb.res[addr]; /* the last value */
                        spin_unlock_irq(&bus->reg_lock);
@@ -819,21 +819,21 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr,
        if (hbus->no_response_fallback)
                return -EIO;
 
-       if (!chip->polling_mode && chip->poll_count < 2) {
+       if (!bus->polling_mode && bus->poll_count < 2) {
                dev_dbg(chip->card->dev,
                        "azx_get_response timeout, polling the codec once: last cmd=0x%08x\n",
                        bus->last_cmd[addr]);
                do_poll = 1;
-               chip->poll_count++;
+               bus->poll_count++;
                goto again;
        }
 
 
-       if (!chip->polling_mode) {
+       if (!bus->polling_mode) {
                dev_warn(chip->card->dev,
                         "azx_get_response timeout, switching to polling mode: last cmd=0x%08x\n",
                         bus->last_cmd[addr]);
-               chip->polling_mode = 1;
+               bus->polling_mode = 1;
                goto again;
        }