diff mbox

[v2,3/8] i2c-mux: move the slave side adapter management to i2c_mux_core

Message ID 568C1683.3080108@lysator.liu.se (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Rosin Jan. 5, 2016, 7:16 p.m. UTC
Hi,

This should fix it (I'm not sending a v3 right away).

Cheers,
Peter
diff mbox

Patch

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
index 1c982a56acd5..5de993deca7e 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
@@ -16,6 +16,7 @@ 
 
 #include <linux/kernel.h>
 #include <linux/i2c.h>
+#include <linux/i2c-mux.h>
 #include <linux/dmi.h>
 #include <linux/acpi.h>
 #include "inv_mpu_iio.h"
@@ -182,7 +183,7 @@  int inv_mpu_acpi_create_mux_client(struct inv_mpu6050_state *st)
 			} else
 				return 0; /* no secondary addr, which is OK */
 		}
-		st->mux_client = i2c_new_device(st->mux_adapter, &info);
+		st->mux_client = i2c_new_device(st->muxc->adapter[0], &info);
 		if (!st->mux_client)
 			return -ENODEV;