linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: media: replaced deprecated probe method
@ 2018-10-01  9:42 Andrey Abramov
  2018-10-01  9:52 ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Abramov @ 2018-10-01  9:42 UTC (permalink / raw)
  To: mchehab
  Cc: gregkh, linux-media, devel, linux-kernel, dan.carpenter, Andrey Abramov

Replaced i2c_driver::probe with i2c_driver::probe_new,
	because documentation says that probe method is "soon to be deprecated".
And fixed problems of the previous attempt.

Signed-off-by: Andrey Abramov <st5pub@yandex.ru>
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index a90b2eb112f9..6865e9fb6420 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2574,8 +2574,7 @@ static const struct video_device bcm2048_viddev_template = {
 /*
  *	I2C driver interface
  */
-static int bcm2048_i2c_driver_probe(struct i2c_client *client,
-				    const struct i2c_device_id *id)
+static int bcm2048_i2c_driver_probe(struct i2c_client *client)
 {
 	struct bcm2048_device *bdev;
 	int err;
@@ -2679,7 +2678,7 @@ static struct i2c_driver bcm2048_i2c_driver = {
 	.driver		= {
 		.name	= BCM2048_DRIVER_NAME,
 	},
-	.probe		= bcm2048_i2c_driver_probe,
+	.probe_new	= bcm2048_i2c_driver_probe,
 	.remove		= bcm2048_i2c_driver_remove,
 	.id_table	= bcm2048_id,
 };
-- 
2.19.0


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

* Re: [PATCH] Staging: media: replaced deprecated probe method
  2018-10-01  9:42 [PATCH] Staging: media: replaced deprecated probe method Andrey Abramov
@ 2018-10-01  9:52 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-10-01  9:52 UTC (permalink / raw)
  To: Andrey Abramov; +Cc: mchehab, gregkh, linux-media, devel, linux-kernel

On Mon, Oct 01, 2018 at 12:42:29PM +0300, Andrey Abramov wrote:
> Replaced i2c_driver::probe with i2c_driver::probe_new,
> 	because documentation says that probe method is "soon to be deprecated".
> And fixed problems of the previous attempt.

I'm sorry to complain again...  Please, don't reference the "previous
attempt" in the commit message.  The previous attempt is gone so no one
will remember what you are talking about after tomorrow.  This is how
you resend a patch.

Change the subject to:

Subject: [PATCH v3] Staging: media: replace deprecated probe method

> 
> Signed-off-by: Andrey Abramov <st5pub@yandex.ru>
> ---
>  drivers/staging/media/bcm2048/radio-bcm2048.c | 5 ++---

Then right after the --- line put:

v3:  fix commit message

That part of the commit message will be removed when we apply the patch.

regards,
dan carpenter



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

* Re: [PATCH] Staging: media: replaced deprecated probe method
  2018-09-29 18:51 Andrey Abramov
@ 2018-10-01  6:48 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-10-01  6:48 UTC (permalink / raw)
  To: Andrey Abramov; +Cc: mchehab, devel, gregkh, linux-kernel, linux-media

On Sat, Sep 29, 2018 at 09:51:50PM +0300, Andrey Abramov wrote:
> drivers/staging/media/bcm2048/radio-bcm2048.c replaced i2c_driver::probe with i2c_driver::probe_new, because documentation says that i2c_driver::probe "soon to be deprecated"
> 

This needs to be line wrapped at 72 characters.

> Signed-off-by: Andrey Abramov <st5pub@yandex.ru>
> ---
>  drivers/staging/media/bcm2048/radio-bcm2048.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> index a90b2eb112f9..756f7f08c713 100644
> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> @@ -2574,8 +2574,7 @@ static const struct video_device bcm2048_viddev_template = {
>  /*
>   *	I2C driver interface
>   */
> -static int bcm2048_i2c_driver_probe(struct i2c_client *client,
> -				    const struct i2c_device_id *id)
> +static int bcm2048_i2c_driver_probe_new(struct i2c_client *client)

Don't rename the function.  Just remove the unused parameter.

regards,
dan carpenter


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

* [PATCH] Staging: media: replaced deprecated probe method
@ 2018-09-29 18:51 Andrey Abramov
  2018-10-01  6:48 ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Abramov @ 2018-09-29 18:51 UTC (permalink / raw)
  To: mchehab; +Cc: gregkh, linux-media, devel, linux-kernel, Andrey Abramov

drivers/staging/media/bcm2048/radio-bcm2048.c replaced i2c_driver::probe with i2c_driver::probe_new, because documentation says that i2c_driver::probe "soon to be deprecated"

Signed-off-by: Andrey Abramov <st5pub@yandex.ru>
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index a90b2eb112f9..756f7f08c713 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2574,8 +2574,7 @@ static const struct video_device bcm2048_viddev_template = {
 /*
  *	I2C driver interface
  */
-static int bcm2048_i2c_driver_probe(struct i2c_client *client,
-				    const struct i2c_device_id *id)
+static int bcm2048_i2c_driver_probe_new(struct i2c_client *client)
 {
 	struct bcm2048_device *bdev;
 	int err;
@@ -2679,7 +2678,7 @@ static struct i2c_driver bcm2048_i2c_driver = {
 	.driver		= {
 		.name	= BCM2048_DRIVER_NAME,
 	},
-	.probe		= bcm2048_i2c_driver_probe,
+	.probe_new	= bcm2048_i2c_driver_probe_new,
 	.remove		= bcm2048_i2c_driver_remove,
 	.id_table	= bcm2048_id,
 };
-- 
2.19.0


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

end of thread, other threads:[~2018-10-01  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01  9:42 [PATCH] Staging: media: replaced deprecated probe method Andrey Abramov
2018-10-01  9:52 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2018-09-29 18:51 Andrey Abramov
2018-10-01  6:48 ` Dan Carpenter

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