linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: remove i2c_new_dummy() API
@ 2019-12-06  0:23 Wolfram Sang
  2019-12-06  8:33 ` Niklas Söderlund
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-12-06  0:23 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

All in-kernel users have been converted to
{devm_}i2c_new_dummy_device(). Remove the old API.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/i2c-core-base.c | 23 -----------------------
 include/linux/i2c.h         |  6 ------
 2 files changed, 29 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 9333c865d4a9..9f8dcd3f8385 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -896,29 +896,6 @@ struct i2c_client *i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address
 }
 EXPORT_SYMBOL_GPL(i2c_new_dummy_device);
 
-/**
- * i2c_new_dummy - return a new i2c device bound to a dummy driver
- * @adapter: the adapter managing the device
- * @address: seven bit address to be used
- * Context: can sleep
- *
- * This deprecated function has the same functionality as @i2c_new_dummy_device,
- * it just returns NULL instead of an ERR_PTR in case of an error for
- * compatibility with current I2C API. It will be removed once all users are
- * converted.
- *
- * This returns the new i2c client, which should be saved for later use with
- * i2c_unregister_device(); or NULL to indicate an error.
- */
-struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address)
-{
-	struct i2c_client *ret;
-
-	ret = i2c_new_dummy_device(adapter, address);
-	return IS_ERR(ret) ? NULL : ret;
-}
-EXPORT_SYMBOL_GPL(i2c_new_dummy);
-
 struct i2c_dummy_devres {
 	struct i2c_client *client;
 };
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index d2f786706657..d1baf8d57536 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -466,12 +466,6 @@ i2c_new_probed_device(struct i2c_adapter *adap,
 /* Common custom probe functions */
 extern int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr);
 
-/* For devices that use several addresses, use i2c_new_dummy() to make
- * client handles for the extra addresses.
- */
-extern struct i2c_client *
-i2c_new_dummy(struct i2c_adapter *adap, u16 address);
-
 extern struct i2c_client *
 i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address);
 
-- 
2.20.1


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

* Re: [PATCH] i2c: remove i2c_new_dummy() API
  2019-12-06  0:23 [PATCH] i2c: remove i2c_new_dummy() API Wolfram Sang
@ 2019-12-06  8:33 ` Niklas Söderlund
  2019-12-06 11:18 ` Luca Ceresoli
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2019-12-06  8:33 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

Hi Wolfram,

Thanks for your work.

On 2019-12-06 01:23:22 +0100, Wolfram Sang wrote:
> All in-kernel users have been converted to
> {devm_}i2c_new_dummy_device(). Remove the old API.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/i2c/i2c-core-base.c | 23 -----------------------
>  include/linux/i2c.h         |  6 ------
>  2 files changed, 29 deletions(-)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 9333c865d4a9..9f8dcd3f8385 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -896,29 +896,6 @@ struct i2c_client *i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address
>  }
>  EXPORT_SYMBOL_GPL(i2c_new_dummy_device);
>  
> -/**
> - * i2c_new_dummy - return a new i2c device bound to a dummy driver
> - * @adapter: the adapter managing the device
> - * @address: seven bit address to be used
> - * Context: can sleep
> - *
> - * This deprecated function has the same functionality as @i2c_new_dummy_device,
> - * it just returns NULL instead of an ERR_PTR in case of an error for
> - * compatibility with current I2C API. It will be removed once all users are
> - * converted.
> - *
> - * This returns the new i2c client, which should be saved for later use with
> - * i2c_unregister_device(); or NULL to indicate an error.
> - */
> -struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address)
> -{
> -	struct i2c_client *ret;
> -
> -	ret = i2c_new_dummy_device(adapter, address);
> -	return IS_ERR(ret) ? NULL : ret;
> -}
> -EXPORT_SYMBOL_GPL(i2c_new_dummy);
> -
>  struct i2c_dummy_devres {
>  	struct i2c_client *client;
>  };
> diff --git a/include/linux/i2c.h b/include/linux/i2c.h
> index d2f786706657..d1baf8d57536 100644
> --- a/include/linux/i2c.h
> +++ b/include/linux/i2c.h
> @@ -466,12 +466,6 @@ i2c_new_probed_device(struct i2c_adapter *adap,
>  /* Common custom probe functions */
>  extern int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr);
>  
> -/* For devices that use several addresses, use i2c_new_dummy() to make
> - * client handles for the extra addresses.
> - */
> -extern struct i2c_client *
> -i2c_new_dummy(struct i2c_adapter *adap, u16 address);
> -
>  extern struct i2c_client *
>  i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address);
>  
> -- 
> 2.20.1
> 

-- 
Regards,
Niklas Söderlund

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

* Re: [PATCH] i2c: remove i2c_new_dummy() API
  2019-12-06  0:23 [PATCH] i2c: remove i2c_new_dummy() API Wolfram Sang
  2019-12-06  8:33 ` Niklas Söderlund
@ 2019-12-06 11:18 ` Luca Ceresoli
  2019-12-10 22:20 ` Wolfram Sang
  2019-12-16  9:20 ` Patchwork summary for: linux-renesas-soc patchwork-bot+linux-renesas-soc
  3 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli @ 2019-12-06 11:18 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c; +Cc: linux-renesas-soc

Hi Wolfram,

On 06/12/19 01:23, Wolfram Sang wrote:
> All in-kernel users have been converted to
> {devm_}i2c_new_dummy_device(). Remove the old API.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

-- 
Luca

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

* Re: [PATCH] i2c: remove i2c_new_dummy() API
  2019-12-06  0:23 [PATCH] i2c: remove i2c_new_dummy() API Wolfram Sang
  2019-12-06  8:33 ` Niklas Söderlund
  2019-12-06 11:18 ` Luca Ceresoli
@ 2019-12-10 22:20 ` Wolfram Sang
  2019-12-16  9:20 ` Patchwork summary for: linux-renesas-soc patchwork-bot+linux-renesas-soc
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-12-10 22:20 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

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

On Fri, Dec 06, 2019 at 01:23:22AM +0100, Wolfram Sang wrote:
> All in-kernel users have been converted to
> {devm_}i2c_new_dummy_device(). Remove the old API.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-current, thanks!


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

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

* Patchwork summary for: linux-renesas-soc
  2019-12-06  0:23 [PATCH] i2c: remove i2c_new_dummy() API Wolfram Sang
                   ` (2 preceding siblings ...)
  2019-12-10 22:20 ` Wolfram Sang
@ 2019-12-16  9:20 ` patchwork-bot+linux-renesas-soc
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+linux-renesas-soc @ 2019-12-16  9:20 UTC (permalink / raw)
  To: linux-renesas-soc

Hello:

The following patches were marked "accepted", because they were applied to
geert/renesas-devel (refs/heads/master):

Patch: i2c: remove i2c_new_dummy() API
  Submitter: Wolfram Sang <wsa+renesas@sang-engineering.com>
  Patchwork: https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=212557

Total patches: 1

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

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

end of thread, other threads:[~2019-12-16  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06  0:23 [PATCH] i2c: remove i2c_new_dummy() API Wolfram Sang
2019-12-06  8:33 ` Niklas Söderlund
2019-12-06 11:18 ` Luca Ceresoli
2019-12-10 22:20 ` Wolfram Sang
2019-12-16  9:20 ` Patchwork summary for: linux-renesas-soc patchwork-bot+linux-renesas-soc

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