Message ID | 20200326211015.13654-2-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | x86: convert to use new I2C API | expand |
On Thu, Mar 26, 2020 at 11:10 PM Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > > Move away from the deprecated API and return the shiny new ERRPTR where > useful. > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > arch/x86/platform/intel-mid/sfi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c > index b8f7f193f383..30bd5714a3d4 100644 > --- a/arch/x86/platform/intel-mid/sfi.c > +++ b/arch/x86/platform/intel-mid/sfi.c > @@ -287,8 +287,8 @@ void intel_scu_devices_create(void) > > adapter = i2c_get_adapter(i2c_bus[i]); > if (adapter) { > - client = i2c_new_device(adapter, i2c_devs[i]); > - if (!client) > + client = i2c_new_client_device(adapter, i2c_devs[i]); > + if (IS_ERR(client)) > pr_err("can't create i2c device %s\n", > i2c_devs[i]->type); > } else > -- > 2.20.1 >
On Thu, Mar 26, 2020 at 10:10:15PM +0100, Wolfram Sang wrote: > Move away from the deprecated API and return the shiny new ERRPTR where > useful. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- Can we have this now so I can remove the old API in the next merge window? Andy already reviewed it. Thanks! > arch/x86/platform/intel-mid/sfi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c > index b8f7f193f383..30bd5714a3d4 100644 > --- a/arch/x86/platform/intel-mid/sfi.c > +++ b/arch/x86/platform/intel-mid/sfi.c > @@ -287,8 +287,8 @@ void intel_scu_devices_create(void) > > adapter = i2c_get_adapter(i2c_bus[i]); > if (adapter) { > - client = i2c_new_device(adapter, i2c_devs[i]); > - if (!client) > + client = i2c_new_client_device(adapter, i2c_devs[i]); > + if (IS_ERR(client)) > pr_err("can't create i2c device %s\n", > i2c_devs[i]->type); > } else > -- > 2.20.1 >
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index b8f7f193f383..30bd5714a3d4 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c @@ -287,8 +287,8 @@ void intel_scu_devices_create(void) adapter = i2c_get_adapter(i2c_bus[i]); if (adapter) { - client = i2c_new_device(adapter, i2c_devs[i]); - if (!client) + client = i2c_new_client_device(adapter, i2c_devs[i]); + if (IS_ERR(client)) pr_err("can't create i2c device %s\n", i2c_devs[i]->type); } else
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- arch/x86/platform/intel-mid/sfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)