Commit d1a6459f authored by Zhu Yingjiang's avatar Zhu Yingjiang Committed by Mark Brown

ASoC: SOF: Intel: hda: set bus->idx as 0

Setting the bus->idx as 0, for we only have one HDA
bus atm. This need to be fixed when there are more
than one HDA bus.
Signed-off-by: default avatarZhu Yingjiang <yingjiang.zhu@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 74ed4097
...@@ -80,8 +80,6 @@ static const struct hdac_io_ops io_ops = { ...@@ -80,8 +80,6 @@ static const struct hdac_io_ops io_ops = {
void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev, void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev,
const struct hdac_ext_bus_ops *ext_ops) const struct hdac_ext_bus_ops *ext_ops)
{ {
static int idx;
memset(bus, 0, sizeof(*bus)); memset(bus, 0, sizeof(*bus));
bus->dev = dev; bus->dev = dev;
...@@ -90,7 +88,12 @@ void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev, ...@@ -90,7 +88,12 @@ void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev,
bus->irq = -1; bus->irq = -1;
bus->ext_ops = ext_ops; bus->ext_ops = ext_ops;
bus->idx = idx++;
/*
* There is only one HDA bus atm. keep the index as 0.
* Need to fix when there are more than one HDA bus.
*/
bus->idx = 0;
spin_lock_init(&bus->reg_lock); spin_lock_init(&bus->reg_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment