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

From: Peter Rosin
Date: Tue Jan 05 2016 - 14:16:37 EST


Hi,

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

Cheers,
Peter

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;

--


On 2016-01-05 17:49, kbuild test robot wrote:
> Hi Peter,
>
> [auto build test ERROR on wsa/i2c/for-next]
> [also build test ERROR on v4.4-rc8 next-20160105]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>
> url: https://github.com/0day-ci/linux/commits/Peter-Rosin/i2c-mux-cleanup-and-locking-update/20160106-000205
> base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux i2c/for-next
> config: i386-randconfig-s1-201601 (attached as .config)
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
> drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c: In function 'inv_mpu_acpi_create_mux_client':
>>> drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c:185:37: error: 'struct inv_mpu6050_state' has no member named 'mux_adapter'
> st->mux_client = i2c_new_device(st->mux_adapter, &info);
> ^
>
> vim +185 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
>
> a35c5d1a Srinivas Pandruvada 2015-01-30 179 *name = '\0';
> a35c5d1a Srinivas Pandruvada 2015-01-30 180 strlcat(info.type, "-client",
> a35c5d1a Srinivas Pandruvada 2015-01-30 181 sizeof(info.type));
> a35c5d1a Srinivas Pandruvada 2015-01-30 182 } else
> a35c5d1a Srinivas Pandruvada 2015-01-30 183 return 0; /* no secondary addr, which is OK */
> a35c5d1a Srinivas Pandruvada 2015-01-30 184 }
> a35c5d1a Srinivas Pandruvada 2015-01-30 @185 st->mux_client = i2c_new_device(st->mux_adapter, &info);
> a35c5d1a Srinivas Pandruvada 2015-01-30 186 if (!st->mux_client)
> a35c5d1a Srinivas Pandruvada 2015-01-30 187 return -ENODEV;
> a35c5d1a Srinivas Pandruvada 2015-01-30 188
>
> :::::: The code at line 185 was first introduced by commit
> :::::: a35c5d1aa96aa6cc70e91786cbe9be4db23f8f4a iio: imu: inv_mpu6050: Create mux clients for ACPI
>
> :::::: TO: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> :::::: CC: Jonathan Cameron <jic23@xxxxxxxxxx>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/