linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] x86: convert to use new I2C API
@ 2020-03-26 21:10 Wolfram Sang
  2020-03-26 21:10 ` [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device() Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, linux-kernel, platform-driver-x86, x86

We are deprecating calls which return NULL in favor of new variants which
return an ERR_PTR. Only build tested.


Wolfram Sang (1):
  x86/platform/intel-mid: convert to use i2c_new_client_device()

 arch/x86/platform/intel-mid/sfi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device()
  2020-03-26 21:10 [PATCH 0/1] x86: convert to use new I2C API Wolfram Sang
@ 2020-03-26 21:10 ` Wolfram Sang
  2020-03-27  7:37   ` Andy Shevchenko
  2020-05-12 16:32   ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Darren Hart, Andy Shevchenko, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86,
	platform-driver-x86, linux-kernel

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(-)

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device()
  2020-03-26 21:10 ` [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device() Wolfram Sang
@ 2020-03-27  7:37   ` Andy Shevchenko
  2020-05-12 16:32   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2020-03-27  7:37 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Darren Hart, Andy Shevchenko, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Platform Driver, Linux Kernel Mailing List

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
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device()
  2020-03-26 21:10 ` [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device() Wolfram Sang
  2020-03-27  7:37   ` Andy Shevchenko
@ 2020-05-12 16:32   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-05-12 16:32 UTC (permalink / raw)
  To: linux-i2c
  Cc: Darren Hart, Andy Shevchenko, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H. Peter Anvin, x86, platform-driver-x86,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-12 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 21:10 [PATCH 0/1] x86: convert to use new I2C API Wolfram Sang
2020-03-26 21:10 ` [PATCH 1/1] x86/platform/intel-mid: convert to use i2c_new_client_device() Wolfram Sang
2020-03-27  7:37   ` Andy Shevchenko
2020-05-12 16:32   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).